]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/vfscore: Register `pipe2` to syscall_shim
authorSergiu Moga <sergiu.moga@protonmail.com>
Mon, 15 Feb 2021 18:14:49 +0000 (20:14 +0200)
committerUnikraft <monkey@unikraft.io>
Mon, 17 May 2021 07:58:28 +0000 (07:58 +0000)
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

lib/vfscore/Makefile.uk
lib/vfscore/exportsyms.uk
lib/vfscore/pipe.c

index c662f0064c98f69c904f527d8c17dfea4558112d..8d54d038e94d28f12bbf0efd65336a59c66436e5 100644 (file)
@@ -68,3 +68,4 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += chown-3
 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
index f81f9d02c1cac8c732d19bb3440e05a15f70908f..fde4e510be4583ceb3d438b23e086b340fb07bec 100644 (file)
@@ -195,6 +195,8 @@ vn_unlock
 vfs_busy
 pipe
 pipe2
+uk_syscall_e_pipe2
+uk_syscall_r_pipe2
 mkfifo
 futimes
 uk_syscall_e_futimesat
index 302eac50f2eeb5e96656677720992967020b547c..ea586ddbcfefdee1b4a930815f3a89f498032441 100644 (file)
@@ -41,6 +41,7 @@
 #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)
@@ -572,7 +573,7 @@ ERR_EXIT:
 }
 
 /* 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;