projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup: use <sys/syscall.h>
[lttng-ust.git]
/
liblttng-ust-libc-wrapper
/
lttng-ust-pthread.c
diff --git
a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c
b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c
index fd3af1105a961422e276671a483b18c81a80389a..1e65207f8bc007e69539e3220cca7a89f1e69d67 100644
(file)
--- a/
liblttng-ust-libc-wrapper/lttng-ust-pthread.c
+++ b/
liblttng-ust-libc-wrapper/lttng-ust-pthread.c
@@
-16,8
+16,13
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#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 <lttng/ust-dlfcn.h>
+#include <helper.h>
#include <pthread.h>
#define TRACEPOINT_DEFINE
#include <pthread.h>
#define TRACEPOINT_DEFINE
@@
-48,10
+53,10
@@
int pthread_mutex_lock(pthread_mutex_t *mutex)
thread_in_trace = 1;
tracepoint(lttng_ust_pthread, pthread_mutex_lock_req, mutex,
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 = 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 = 0;
return retval;
}
@@
-78,7
+83,7
@@
int pthread_mutex_trylock(pthread_mutex_t *mutex)
thread_in_trace = 1;
retval = mutex_trylock(mutex);
tracepoint(lttng_ust_pthread, pthread_mutex_trylock, mutex,
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 = 0;
return retval;
}
@@
-105,7
+110,7
@@
int pthread_mutex_unlock(pthread_mutex_t *mutex)
thread_in_trace = 1;
retval = mutex_unlock(mutex);
tracepoint(lttng_ust_pthread, pthread_mutex_unlock, mutex,
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;
}
thread_in_trace = 0;
return retval;
}
This page took
0.030877 seconds
and
4
git commands to generate.