Subject: Re: how to use syscalls
To: Robin Kumar <email@example.com>
From: Manuel Bouyer <firstname.lastname@example.org>
Date: 06/25/2000 21:36:17
On Sun, Jun 25, 2000 at 11:48:29AM -0700, Robin Kumar wrote:
> I was trying to add a system call to NetBSD 1.4.1.
> What i have done is added the entries in
> syscalls.master and some other syscall files. I have
> added code for syscall in xyz.c.It is has been
> also, but the problem is i do not know how can i
> use it from a user process.
> What has to be done to call it from a C
> programme.Please answer in detail as i donot know
> anything about it.I want to mention one more thing
> i do not have /usr/src/lib rather i have
Ok, you've done the kernel part now you need to add your syscall to libc.
Grab from ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.4.1/source/sets/src.tgz
and untar it (I suspect you've only the kernel sources installed).
Then you'll have the libc sources in /usr/src/lib/libc. Add you syscall here,
and recompile/reinstall libc.
> Is ther any other way like in Linux,one can use
> standard macros in C programme to call a system call.
I don't know much about linux, but I suspect in NetBSD this is all
hidden in libc.
Manuel Bouyer <email@example.com>