Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Feb 1997 09:50:49 -0800 (PST)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        hackers@freebsd.org
Cc:        henryt2@ix.netcom.com
Subject:   BSD216-syscall (fwd)
Message-ID:  <Pine.BSI.3.94.970210095023.195E-100000@localhost>

next in thread | raw e-mail | index | archive | help
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 <henryt2@ix.netcom.com>
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.94.970210095023.195E-100000>