*BSD News Article 88834


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!lucy.swin.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!news.kei.com!news.mathworks.com!howland.erols.net!ix.netcom.com!news
From: Tsang Shing <henryt2@ix.netcom.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: BSD-syscall
Date: Mon, 10 Feb 1997 00:27:14 -0800
Organization: Netcom
Lines: 27
Message-ID: <32FEDBE2.2D44@ix.netcom.com>
NNTP-Posting-Host: wck-ca9-05.ix.netcom.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-NETCOM-Date: Mon Feb 10  1:35:35 AM CST 1997
X-Mailer: Mozilla 2.01E-NC250  (Win16; U)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:35286

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 call 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.
					Henry