raw_syscalls: move lxc_raw_gettid()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-10-03 13:10:55 +02:00
parent 303037d2f6
commit 07a50156ed
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D
2 changed files with 9 additions and 9 deletions

View 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 */

View 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);