Remove `SYS_getpid` system call. (XCC)
authorDan Cross <crossd@gmail.com>
Wed, 5 Oct 2016 18:01:44 +0000 (14:01 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 5 Oct 2016 18:28:29 +0000 (14:28 -0400)
Remove the redundant and now-unused `getpid` system call:
the replacement is a function in the C library that simply
retrieves the process ID form __procinfo.

Reinstall your kernel headers.

Change-Id: Ib0649a17c2a7daf1f01194545d4122daf25f9e25
Signed-off-by: Dan Cross <crossd@gmail.com>
[XCC]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/ros/bits/syscall.h
kern/src/syscall.c

index 764fbf9..36a8db6 100644 (file)
@@ -11,7 +11,7 @@
 /* was SYS_cgetc                                        6 */
 #define SYS_getpcoreid                          7
 #define SYS_getvcoreid                          8
-#define SYS_getpid                                      9
+/* was #define SYS_getpid                       9 */
 #define SYS_proc_create                                10
 #define SYS_proc_run                           11
 #define SYS_proc_destroy                       12
index 300010a..326b257 100644 (file)
@@ -627,12 +627,6 @@ static size_t sys_getvcoreid(struct proc *p)
 
 /************** Process management syscalls **************/
 
-/* Returns the calling process's pid */
-static pid_t sys_getpid(struct proc *p)
-{
-       return p->pid;
-}
-
 /* Helper for proc_create and fork */
 static void inherit_strace(struct proc *parent, struct proc *child)
 {
@@ -2553,7 +2547,6 @@ const struct sys_table_entry syscall_table[] = {
        [SYS_reboot] = {(syscall_t)reboot, "reboot!"},
        [SYS_getpcoreid] = {(syscall_t)sys_getpcoreid, "getpcoreid"},
        [SYS_getvcoreid] = {(syscall_t)sys_getvcoreid, "getvcoreid"},
-       [SYS_getpid] = {(syscall_t)sys_getpid, "getpid"},
        [SYS_proc_create] = {(syscall_t)sys_proc_create, "proc_create"},
        [SYS_proc_run] = {(syscall_t)sys_proc_run, "proc_run"},
        [SYS_proc_destroy] = {(syscall_t)sys_proc_destroy, "proc_destroy"},