Difference between sysproc.c and proc.c

124 Views Asked by At

I’m doing a project for class that includes implementing a lottery scheduler in xv6. I have to implement two system calls settickets() and getpinfo(). I added the system calls to syscall.c, syscall.h, sysfile.c, user.h, usys.S etc.

I’m confused about where I put the actual code to implement the system calls. Some sites say the code goes in sysproc.c and others say proc.c . Can it go in either and what is the difference between the two files? also would the name be int sys_settickets() or just int settickets() ?

(what i mean by implementation; idk if that word is correct in this context)

int sys_settickets() 
{
 //code 
} 

or

int settickets() 
{
//code
}
0

There are 0 best solutions below