From owner-freebsd-hackers Mon Feb 10 09:50:59 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA14501 for hackers-outgoing; Mon, 10 Feb 1997 09:50:59 -0800 (PST) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA14491 for ; Mon, 10 Feb 1997 09:50:51 -0800 (PST) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.5/8.6.12) with SMTP id JAA00221; Mon, 10 Feb 1997 09:50:49 -0800 (PST) Date: Mon, 10 Feb 1997 09:50:49 -0800 (PST) From: Doug White X-Sender: dwhite@localhost Reply-To: Doug White To: hackers@freebsd.org cc: henryt2@ix.netcom.com Subject: BSD216-syscall (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk This belongs over here. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major ---------- Forwarded message ---------- Date: Mon, 10 Feb 1997 00:10:01 -0800 From: Tsang Shing To: freebsd-questions@FreeBSD.ORG Subject: BSD216-syscall Hi, I have a project that using BSD 2.1.6 to implement a syscall. I need to add a new mapping from syscall number to kernel handler function. For instance, I need to map syscall number 151 to a function called foo(). I undestand I need to edit the file, syscall.master line 151, change that line from 151 UNIMPL 0 NOHIDE nosys to: 151 STD 2 BSD semaphore Then I need to run makesyscalls.sh. This generatess syscalls.c. But I don't know how to run the makesyscalls.sh ? Then also , I need to define a syscall handler for this in the kern directory. But I don't know how to do this. Some people told me to look at other syscall handlers(i.e. vfs_syscalls.c) to get some idea of function declaration, but the file is too big, I can't figure out what can I get from other files! Then I need to re-configure and re-make kernel and in the end, after reboot, I can access my syscall with syscall(151,arg1,arg2) If someone knows all those stuff, understand those things, please email me back! Would you also give me an example that the function foo() need to use the args? Also, is that true that those arguments are only for another funtion-- the syscall handler? I just so confused about all these things, please give me one simple example, one simple example of this implementation. Thanks.