Commit e8cdf57f authored by Pavel Emelyanov's avatar Pavel Emelyanov

syscall: Add fcntl syscall and F_GETFD cmd

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f999b8cf
......@@ -34,6 +34,7 @@
#define __NR_exit 60
#define __NR_wait4 61
#define __NR_kill 62
#define __NR_fcntl 72
#define __NR_flock 73
#define __NR_unlink 87
#define __NR_setresuid 117
......
......@@ -414,6 +414,15 @@ sys_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx
return syscall5(__NR_kcmp, (long)pid1, (long)pid2, (long)type, idx1, idx2);
}
static long always_inline sys_fcntl(int fd, int type, long arg)
{
return syscall3(__NR_fcntl, (long)fd, (long)type, (long)arg);
}
#ifndef F_GETFD
#define F_GETFD 1
#endif
#ifndef CLONE_NEWPID
#define CLONE_NEWPID 0x20000000
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment