Register `pipe2` system call to syscall_shim library.
Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Florin Diaconescu <florin.diaconescu@protonmail.com>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #134
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += stat-2
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += mkdir-2
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += umount2-2
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += pipe2-2
vfs_busy
pipe
pipe2
+uk_syscall_e_pipe2
+uk_syscall_r_pipe2
mkfifo
futimes
uk_syscall_e_futimesat
#include <vfscore/vnode.h>
#include <uk/wait.h>
#include <sys/ioctl.h>
+#include <uk/syscall.h>
/* We use the default size in Linux kernel */
#define PIPE_MAX_SIZE (1 << CONFIG_LIBVFSCORE_PIPE_SIZE_ORDER)
}
/* TODO find a more efficient way to implement pipe2() */
-int pipe2(int pipefd[2], int flags)
+UK_SYSCALL_R_DEFINE(int, pipe2, int*, pipefd, int, flags)
{
int rc;