Subject: adding a syscall -- howto?
To: None <tech-kern@netbsd.org>
From: Joe Reed <jnr@po.cwru.edu>
List: tech-kern
Date: 08/13/2002 09:11:19
hi,
can someone give me a quick rundown on the steps needed to add a system call?
the 2 lines included in www.netbsd.org/Documentation/kernel/programming.html
don't help too much.
i am trying to add a system call, (call it newsyscall() for example)
i've added sys_newsyscall to sys/kern/syscalls.master, ran `make
init_sysent.c` i'va also added sys/net/newsys_syscalls.c to sys/conf/files
which function to i define? newsyscall() or sys_newsyscall()? (i assume
sys_newsyscall)
if i want my syscall to verify a uid/gid of the calling process, do i have to
do anything special to get the proc struct passed to the function?
if anyone can offer pointers, documentation, or examples, i'd appreciate it.
--joe