Create new system-call in xv6 that returns data about an open files for all running processes
问题 Im started to learn about xv6. And I'm trying to add a new system call that will print the list of open files for all running processes. It has to print pid of each process, its file descriptor number (0,1,2- for each pid), if the file is regular or piped and if the file is readable of writable. So I know is how to get the pid. Here is an example of a code: struct proc *p; sti(); acquire(&ptable.lock); cprintf("name \t pid \t type \t \n"); for (p=ptable.proc; p<&ptable.proc[NPROC]; p++){