*/
#define _GNU_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 <lttng/ust-dlfcn.h>
+#include <helper.h>
#include <pthread.h>
#define TRACEPOINT_DEFINE
thread_in_trace = 1;
tracepoint(lttng_ust_pthread, pthread_mutex_lock_req, mutex,
- __builtin_return_address(0));
+ LTTNG_UST_CALLER_IP());
retval = mutex_lock(mutex);
tracepoint(lttng_ust_pthread, pthread_mutex_lock_acq, mutex,
- retval, __builtin_return_address(0));
+ retval, LTTNG_UST_CALLER_IP());
thread_in_trace = 0;
return retval;
}
thread_in_trace = 1;
retval = mutex_trylock(mutex);
tracepoint(lttng_ust_pthread, pthread_mutex_trylock, mutex,
- retval, __builtin_return_address(0));
+ retval, LTTNG_UST_CALLER_IP());
thread_in_trace = 0;
return retval;
}
thread_in_trace = 1;
retval = mutex_unlock(mutex);
tracepoint(lttng_ust_pthread, pthread_mutex_unlock, mutex,
- retval, __builtin_return_address(0));
+ retval, LTTNG_UST_CALLER_IP());
thread_in_trace = 0;
return retval;
}