]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
raw_syscalls: move lxc_raw_gettid() 2671/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 3 Oct 2018 11:10:55 +0000 (13:10 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 3 Oct 2018 11:10:55 +0000 (13:10 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/raw_syscalls.h
src/lxc/utils.h

index 513089649a03eb2620ffb787f42f446111b11dbe..224cf92fcafaa55b52adace13b59923a762fde5f 100644 (file)
@@ -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 */
index f7247a2d81879a284551ad52cede69149835e7ce..bc298acc8d3c90db31021d446137311d0b5bc2af 100644 (file)
@@ -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);