The xv6 pstree project requires to add a new system call get…
The xv6 pstree project requires to add a new system call getprocs. In order to add the new system call getprocs, what C code changes need to be made to the following code fragment in xv6 syscall.c? extern int sys_chdir(void);extern int sys_close(void);…extern int sys_wait(void);extern int sys_write(void);extern int sys_uptime(void);static int (*syscalls sys_fork, sys_exit,… sys_mknod, sys_unlink, sys_link, sys_mkdir, sys_clos,};voidsyscall(void){ int num; num = proc->tf->eax; if(num > 0 && num < NELEM(syscalls) && syscalls) { proc->tf->eax = syscalls(); } else { cprintf(“%d %s: unknown sys call %d\n”, proc->pid, proc->name, num); proc->tf->eax = -1; }}