blob: 281f86132766b28576a42415abc9b357fbda136d [file] [log] [blame]
Hou Taoc7101362022-09-01 14:19:37 +08001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __TASK_LOCAL_STORAGE_HELPER_H
3#define __TASK_LOCAL_STORAGE_HELPER_H
4
5#include <unistd.h>
6#include <sys/syscall.h>
7#include <sys/types.h>
8
9#ifndef __NR_pidfd_open
Hou Tao62c69e82022-10-11 15:12:49 +080010#ifdef __alpha__
11#define __NR_pidfd_open 544
12#else
Hou Taoc7101362022-09-01 14:19:37 +080013#define __NR_pidfd_open 434
14#endif
Hou Tao62c69e82022-10-11 15:12:49 +080015#endif
Hou Taoc7101362022-09-01 14:19:37 +080016
17static inline int sys_pidfd_open(pid_t pid, unsigned int flags)
18{
19 return syscall(__NR_pidfd_open, pid, flags);
20}
21
22#endif