Can any one tell me/ point me any references to how to add a system call / utility in XV6
exhaustive search on google was futile and hacking the hard way also was not productive so far .
the reference book also did not have any hello world example to start with any help greatly appreciated
Next, you need to add pointer to system call in syscall. c file. This file contains an array of function pointers which uses above-defined numbers (indexes) as pointers to system calls which are defined in different location. In order to add your custom system call, add following line to this file.
syscall is declared in unistd. h .
A system call is a procedure that provides the interface between a process and the operating system. It is the way by which a computer program requests a service from the kernel of the operating system. Different operating systems execute different system calls.
To add a system call that can be called in xv6's shell, you should so something with the five files
usys.S use the macro to define connect the call of user to the system call function
defs.h add a forward declaration for your new system call
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With