From owner-freebsd-hackers Wed Aug 5 17:59:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA26922 for freebsd-hackers-outgoing; Wed, 5 Aug 1998 17:59:15 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from spawn.nectar.com (spawn.nectar.com [204.27.67.86]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA26895 for ; Wed, 5 Aug 1998 17:59:03 -0700 (PDT) (envelope-from nectar@spawn.nectar.com) Received: from localhost.nectar.com ([127.0.0.1] helo=spawn.nectar.com) by spawn.nectar.com with esmtp (Exim 1.92 #1) id 0z4ENc-0003k3-00; Wed, 5 Aug 1998 19:58:08 -0500 X-Mailer: exmh version 2.0.2 2/24/98 X-PGP-RSAfprint: 00 F9 E6 A2 C5 4D 0A 76 26 8B 8B 57 73 D0 DE EE X-PGP-RSAkey: http://www.nectar.com/nectar-pgp262.txt From: Jacques Vidrine In-reply-to: <199808052241.AAA05242@surf.IAE.nl> References: <199808052241.AAA05242@surf.IAE.nl> Subject: Re: Adding system calls To: wjw@IAEhv.nl cc: hackers@FreeBSD.ORG Date: Wed, 05 Aug 1998 19:58:08 -0500 Message-Id: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- On 6 August 1998 at 0:41, Willem Jan Withagen 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