1 #ifndef _LTTNG_UST_TID_H
2 #define _LTTNG_UST_TID_H
7 * Copyright 2012 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9 * gettid compatibility layer.
11 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
12 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
14 * Permission is hereby granted to use or copy this program
15 * for any purpose, provided the above notices are retained on all copies.
16 * Permission to modify the code and to distribute modified code is granted,
17 * provided the above notices are retained, and a notice that the code was
18 * modified is included with the above copyright notice.
25 #if defined(_syscall0)
26 _syscall0(pid_t
, gettid
)
27 #elif defined(__NR_gettid)
29 static inline pid_t
gettid(void)
31 return syscall(__NR_gettid
);
34 #include <sys/types.h>
37 /* Fall-back on getpid for tid if not available. */
38 static inline pid_t
gettid(void)
44 #endif /* _LTTNG_UST_TID_H */
This page took 0.030731 seconds and 4 git commands to generate.