Subject: Re: searchable mailing lists/adding a system call
To: Andrew Brown <atatat@atatdot.net>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: current-users
Date: 08/09/1999 15:09:28
On Sun, 8 Aug 1999, Andrew Brown wrote:

> something more than
> 
>    http://www.netbsd.org/Documentation/kernel/programming.html#adding_a_system_call
> 
>    Add an entry in syscalls.master, and add the syscall stub to the
>    appropriate place in /usr/src/lib/libc/sys/Makefile.inc.
> 
> would be very helpful.  something more like:
> 
>  (1) add an entry to syscalls.master
>  (2) make "make init_sysent.c" in /usr/src/sys/kern
>  (3) copy the new syscall.h and syscallargs.h headers from
>      /usr/src/sys/sys to /usr/include/sys
>  (4) add the syscall stub to /usr/src/lib/libc/sys/Makefile.inc

Assuming you're running your source, "make includes" will do this too.

>  (5) add your syscall code to the "appropriate" file in
>      /usr/src/sys/kern (would it go anywhere else?)
>  (6) build and install a new kernel
>  (7) reboot single user
>  (8) build and install a new libc set
>  (9) (re)boot multi-user
> 
> would be much better, imho, with more detailed notes on what each step
> actually accomplishes.  for example, parts 7-9 can be re-arranged (or
> skipped, in the case of booting single user) at the possible cost of
> some stability.  no?

They can be re-arranged. As long as you've installed no programs which use
the new syscalls, you'll never notice they're there or not there. :-)

Take care,

Bill