this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Implement the getpriority(2) syscall

+39
+1
src/kernel/emulation/linux/CMakeLists.txt
··· 112 112 process/waitid.c 113 113 process/execve.c 114 114 process/posix_spawn.c 115 + process/getpriority.c 115 116 signal/duct_signals.c 116 117 signal/kill.c 117 118 signal/sigaltstack.c
+7
src/kernel/emulation/linux/process/getpriority.c
··· 1 + #include "getpriority.h" 2 + 3 + int sys_getpriority(int which, id_t who) { 4 + return LINUX_SYSCALL(__NR_getpriority, which, who); 5 + 6 + // TODO: Errors 7 + }
+29
src/kernel/emulation/linux/process/getpriority.h
··· 1 + #ifndef LINUX_GETPRIORITY_H 2 + #define LINUX_GETPRIORITY_H 3 + 4 + #include <sys/_types.h> 5 + #include <sys/_types/_id_t.h> 6 + #include "../errno.h" 7 + #include "../base.h" 8 + #include <linux-syscalls/linux.h> 9 + 10 + int sys_getpriority(int which, id_t who); 11 + 12 + // Same on BSD and Linux 13 + #define PRIO_PROCESS 0 14 + #define PRIO_PGRP 1 15 + #define PRIO_USER 2 16 + 17 + // Unique to Darwin 18 + #define PRIO_DARWIN_THREAD 3 19 + #define PRIO_DARWIN_PROCESS 4 20 + 21 + // Same on BSD and Linux 22 + #define PRIO_MIN -20 23 + #define PRIO_MAX 20 24 + 25 + // Unique to Darwin 26 + #define PRIO_DARWIN_BG 0x1000 27 + #define PRIO_DARWIN_NONUI 0x1001 28 + 29 + #endif
+2
src/kernel/emulation/linux/syscalls.c
··· 86 86 #include "process/wait4.h" 87 87 #include "process/waitid.h" 88 88 #include "process/execve.h" 89 + #include "process/getpriority.h" 89 90 #include "misc/getentropy.h" 90 91 #include "misc/getlogin.h" 91 92 #include "misc/shared_region_check_np.h" ··· 238 239 [95] = sys_fsync, 239 240 [97] = sys_socket, 240 241 [98] = sys_connect, 242 + [100] = sys_getpriority, 241 243 [104] = sys_bind, 242 244 [105] = sys_setsockopt, 243 245 [106] = sys_listen,