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>
16 #if defined(__NR_gettid)
19 static inline pid_t
lttng_gettid(void)
21 return syscall(__NR_gettid
);
26 #include <sys/types.h>
29 /* Fall-back on getpid for tid if not available. */
30 static inline pid_t
lttng_gettid(void)
37 #endif /* _UST_COMMON_COMPAT_GETTID_H */
This page took 0.030471 seconds and 4 git commands to generate.