Date: Wed, 05 Aug 1998 19:58:08 -0500 From: Jacques Vidrine <n@nectar.com> To: wjw@IAEhv.nl Cc: hackers@FreeBSD.ORG Subject: Re: Adding system calls Message-ID: <E0z4ENc-0003k3-00@spawn.nectar.com> In-Reply-To: <199808052241.AAA05242@surf.IAE.nl> References: <199808052241.AAA05242@surf.IAE.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- On 6 August 1998 at 0:41, Willem Jan Withagen <wjw@surf.IAE.nl> wrote: > Hi, > > This must be a FAQ, but I can not find it. :-( > > What/were is the receipe to add new system calls. > I'd like to add my own sysctl_* calls. If you want a new object in the MIB, see sys/sys/sysctl.h. If you actually want a new system call: 1. Edit $src/sys/kern/syscalls.master. 2. Run ``shmakesyscalls.sh syscalls.master'' or ``make ../sys/sysproto.h'' in sys/kern. To take care of libc: 3. cd $src/include && make install 4. cd $src/lib/libc && make obj depend && make all install I think that's it. Someone with more experience should answer the important questions below. > Are there any directives on what "design" to use while defining these calls. > Like: > - Use only one syscall as a multiplexer > (Which created a not so trivial mess is the current sysctl) > - What parameters are a bad idea to transfer from > user to kernel space? > > And answers to questions like: > - Where can I find the "user"-data > - Hoe to I return results for "call-by-ref" parameters > > Sounds like there should be at least some info on this. > > --WjW Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBNcj/oDeRhT8JRySpAQFBKAP9F5Ajs1YRpZibF3leYgURjCD1NLoQ5qch SatjYunt+uiwBX1u4g8laBMh3efHRILIQfbyr+iSyODnSg9yPV7xHRt5zFOtNwql y+w4ACQO6KJYA4b/fABu0F8qc5XPxVxdgXsemhoQlqxrnLUR7T4XFtVKFczYySSe u9s+C3jYe40= =s0vZ -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0z4ENc-0003k3-00>