2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 * gettid compatibility layer.
9 #ifndef _UST_COMMON_COMPAT_GETTID_H
10 #define _UST_COMMON_COMPAT_GETTID_H
13 #include <sys/syscall.h>
19 static inline pid_t
lttng_gettid(void)
24 #elif defined(__NR_gettid)
27 static inline pid_t
lttng_gettid(void)
29 return syscall(__NR_gettid
);
34 #include <sys/types.h>
37 /* Fall-back on getpid for tid if not available. */
38 static inline pid_t
lttng_gettid(void)
45 #endif /* _UST_COMMON_COMPAT_GETTID_H */
This page took 0.062754 seconds and 4 git commands to generate.