From 07a50156ed3e8ffdd0c7736a581f8e82903d2c09 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 3 Oct 2018 13:10:55 +0200 Subject: [PATCH] raw_syscalls: move lxc_raw_gettid() Signed-off-by: Christian Brauner --- src/lxc/raw_syscalls.h | 9 +++++++++ src/lxc/utils.h | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lxc/raw_syscalls.h b/src/lxc/raw_syscalls.h index 513089649..224cf92fc 100644 --- a/src/lxc/raw_syscalls.h +++ b/src/lxc/raw_syscalls.h @@ -83,4 +83,13 @@ static inline pid_t lxc_raw_getpid(void) return (pid_t)syscall(SYS_getpid); } +static inline pid_t lxc_raw_gettid(void) +{ +#ifdef __NR_gettid + return syscall(__NR_gettid); +#else + return lxc_raw_getpid(); +#endif +} + #endif /* __LXC_RAW_SYSCALL_H */ diff --git a/src/lxc/utils.h b/src/lxc/utils.h index f7247a2d8..bc298acc8 100644 --- a/src/lxc/utils.h +++ b/src/lxc/utils.h @@ -237,15 +237,6 @@ static inline uint64_t lxc_getpagesize(void) */ extern uint64_t lxc_find_next_power2(uint64_t n); -static inline pid_t lxc_raw_gettid(void) -{ -#ifdef SYS_gettid - return syscall(SYS_gettid); -#else - return lxc_raw_getpid(); -#endif -} - /* Set a signal the child process will receive after the parent has died. */ extern int lxc_set_death_signal(int signal, pid_t parent); extern int fd_cloexec(int fd, bool cloexec); -- 2.47.2