2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 * gettid compatibility layer.
9 #ifndef _LTTNG_UST_TID_H
10 #define _LTTNG_UST_TID_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 /* _LTTNG_UST_TID_H */
This page took 0.042048 seconds and 5 git commands to generate.