X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust-libc-wrapper%2Flttng-ust-pthread.c;h=6554a47afe7057f3b8c2c21147574c2f77d5ad09;hb=9b3a9a1f8ee47787e50a130b444dae38eee5dca0;hp=a049d33595a6d367416e627461221f1c8ad8c738;hpb=1ddceb368197a46bcc7bb40054cf3cd51a72840c;p=lttng-ust.git diff --git a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c index a049d335..6554a47a 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c @@ -17,8 +17,13 @@ */ #define _GNU_SOURCE -#define _LGPL_SOURCE +/* + * Do _not_ define _LGPL_SOURCE because we don't want to create a + * circular dependency loop between this malloc wrapper, liburcu and + * libc. + */ #include +#include #include #include @@ -27,7 +32,7 @@ #define TP_IP_PARAM ip #include "ust_pthread.h" -static __thread int thread_in_trace; +static DEFINE_URCU_TLS_IE(int, thread_in_trace); int pthread_mutex_lock(pthread_mutex_t *mutex) {