Create a directory under the /usr/src/linux/ directory to hold
Put any include files in /usr/include/sys/ and /usr/include/linux/.
Add the relocatable module produced by the link of your new
kernel code to the ARCHIVES and the subdirectory to the
of the top level Makefile. See fs/Makefile, target fs.o for an example.
Add a #define __NR_xx to unistd.h to assign a
call number for your system call, where xx, the index, is
something descriptive relating to your system call. It will be used to
set up the vector through sys_call_table to invoke you code.
Add an entry point for your system call to the sys_call_table
in sys.h. It should match the index (xx) that you assigned in
the previous step. The NR_syscalls variable will be
Modify any kernel code in kernel/fs/mm/, etc. to take into account
the environment needed to support your new code.
Run make from the top level to produce the new kernel incorporating
your new code.
At this point, you will have to either add a syscall to your
libraries, or use the proper _syscalln() macro in your
user program for your programs to access the new system call.
The 386DX Microprocessor Programmer's Reference Manual is a
helpful reference, as is James Turley's Advanced 80386
Programming Techniques. See the Annotated bibliography in