Skip to content

Commit

Permalink
raw_syscalls: move lxc_raw_gettid()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Oct 7, 2018
1 parent dbe4068 commit 29c417d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 9 additions & 0 deletions src/lxc/raw_syscalls.h
Expand Up @@ -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 */
9 changes: 0 additions & 9 deletions src/lxc/utils.h
Expand Up @@ -236,15 +236,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);
Expand Down

0 comments on commit 29c417d

Please sign in to comment.