xv6 is a simple unix, but it also has syscall to fits some demands. I read some part of xv6's code to learn a simple syscall
kernel/defs.h #function in syscall
kernel/syscall.h #registed syscall
kernel/syscall.c #syscall entry
kernel/sysproc.c #function for syscall, apply what you want to do
how process in usermode use syscall? in user/user.h
or it can't link syscall with function while compiling
just by name subsitute in perl scripts
how user send the signal of syscall to kernel
set trap function linke to p
switch user trap to kernele trap
process structure
how to detect usercall
it is write in assembly code to link syscall and userfunction together.
Top comments (0)