syslog-ng source
tls-support.h File Reference
#include <syslog-ng-config.h>
#include <stdlib.h>
#include <pthread.h>
Include dependency graph for tls-support.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TLS_BLOCK_START
 
#define TLS_BLOCK_END
 
#define __slng_tls_deref(var)   (*({ struct __slng_tls_variables *__ptr = __slng_tls_deref_helper(__slng_tls_key, sizeof(struct __slng_tls_variables)); &__ptr->var; }))
 
#define __thread   #
 

Macro Definition Documentation

◆ __slng_tls_deref

#define __slng_tls_deref (   var)    (*({ struct __slng_tls_variables *__ptr = __slng_tls_deref_helper(__slng_tls_key, sizeof(struct __slng_tls_variables)); &__ptr->var; }))

◆ __thread

#define __thread   #

◆ TLS_BLOCK_END

#define TLS_BLOCK_END

◆ TLS_BLOCK_START

#define TLS_BLOCK_START
Value:
static pthread_key_t __slng_tls_key; \
static void __attribute__((constructor)) __slng_tls_init_key(void) \
{ \
pthread_key_create(&__slng_tls_key, free); \
} \
\
struct __slng_tls_variables
__attribute__((__visibility__("hidden")))
Definition: native-parser.c:32