From owner-freebsd-hackers Thu Aug 13 13:35:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA10175 for freebsd-hackers-outgoing; Thu, 13 Aug 1998 13:35:48 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA10142 for ; Thu, 13 Aug 1998 13:35:40 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.8.8/8.8.5) with ESMTP id NAA00878; Thu, 13 Aug 1998 13:33:32 -0700 (PDT) Message-Id: <199808132033.NAA00878@dingo.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: wjw@IAEhv.nl cc: hackers@FreeBSD.ORG Subject: Re: Adding system calls In-reply-to: Your message of "Thu, 06 Aug 1998 00:41:37 +0200." <199808052241.AAA05242@surf.IAE.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 13 Aug 1998 13:33:32 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > What/were is the receipe to add new system calls. > I'd like to add my own sysctl_* calls. You don't feel that you can overload the current calls? > 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) This is good if all the subcalls share similar data. > - What parameters are a bad idea to transfer from > user to kernel space? Just the ones you need. > And answers to questions like: > - Where can I find the "user"-data Such as? > - Hoe to I return results for "call-by-ref" parameters Use copyin/copyout and the fu*/su* calls, all of which have manpages in -current. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message