From c75f818fda7d1b5a65f89de250d19e163aa6fe24 Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Mon, 18 Jan 2021 11:54:11 +0200 Subject: [PATCH] lib/posix-process: Register `getpriority` to syscall_shim Register `getpriority` system call to syscall_shim library. Signed-off-by: Sergiu Moga Reviewed-by: Alexander Jung Tested-by: Unikraft CI GitHub-Pull-Request: #87 --- lib/posix-process/Makefile.uk | 1 + lib/posix-process/process.c | 2 +- lib/posix-user/exportsyms.uk | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/posix-process/Makefile.uk b/lib/posix-process/Makefile.uk index 4989d72ef..a78b45908 100644 --- a/lib/posix-process/Makefile.uk +++ b/lib/posix-process/Makefile.uk @@ -16,4 +16,5 @@ UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += setpgid-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += setsid-0 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += getsid-1 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += setpriority-3 +UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += getpriority-2 UK_PROVIDED_SYSCALLS-$(CONFIG_LIBPOSIX_PROCESS) += getpid-0 getppid-0 \ No newline at end of file diff --git a/lib/posix-process/process.c b/lib/posix-process/process.c index 1e55f4be0..c50f60507 100644 --- a/lib/posix-process/process.c +++ b/lib/posix-process/process.c @@ -300,7 +300,7 @@ int nice(int inc __unused) return -1; } -int getpriority(int which, id_t who) +UK_SYSCALL_DEFINE(int, getpriority, int, which, id_t, who) { int rc = 0; diff --git a/lib/posix-user/exportsyms.uk b/lib/posix-user/exportsyms.uk index 4a7015db8..830060456 100644 --- a/lib/posix-user/exportsyms.uk +++ b/lib/posix-user/exportsyms.uk @@ -40,3 +40,6 @@ uk_syscall_r_getsid setpriority uk_syscall_e_setpriority uk_syscall_r_setpriority +getpriority +uk_syscall_e_getpriority +uk_syscall_r_getpriority -- 2.39.5