Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ulysses!hector!ekrell From: ekrell@hector.UUCP (Eduardo Krell) Newsgroups: comp.unix.wizards Subject: Re: syscall(2) function Keywords: syscall, not system calls Message-ID: <11270@ulysses.homer.nj.att.com> Date: 28 Feb 89 00:06:47 GMT References: <3740@ucdavis.ucdavis.edu> Sender: netnews@ulysses.homer.nj.att.com Reply-To: ekrell@hector.UUCP (Eduardo Krell) Distribution: usa Organization: AT&T Bell Laboratories Lines: 23 In article <3740@ucdavis.ucdavis.edu> kerchen@iris.ucdavis.edu (Paul Kerchen) writes: >Is the system call "syscall()" necessary? Yes, and I'll give you an example where I use it. We have a user level C library which implements an extension to the Unix File System. This work was originally done inside the kernel (where it belongs), but for practical reasons we decided to write a user level library which emulates the semantics of our extensions (we didn't want to force our users to run a new kernel just to play with our stuff). This user level library contains functions for all the system calls which take pathnames as arguments (like stat, open, link, etc.). We do some magic with the pathnames supplied to these functions and then call the *real* system calls with maybe different pathnames. The call to the real system call is accomplished through syscall(). I could have done it without syscall(), but it would have required major kludges to do it in a portable way. Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com