From owner-freebsd-hackers Fri Sep 29 12:49:42 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA29063 for hackers-outgoing; Fri, 29 Sep 1995 12:49:42 -0700 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id MAA29053 ; Fri, 29 Sep 1995 12:49:33 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id UAA14369; Fri, 29 Sep 1995 20:49:15 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id UAA09684; Fri, 29 Sep 1995 20:49:12 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.6.12/8.6.9) id UAA04787; Fri, 29 Sep 1995 20:11:39 +0100 From: J Wunsch Message-Id: <199509291911.UAA04787@uriah.heep.sax.de> Subject: Re: Questions on system calls To: humprey@linux1.dlsu.edu.ph Date: Fri, 29 Sep 1995 20:11:39 +0100 (MET) Cc: freebsd-hackers@freebsd.org (FreeBSD hackers), freebsd-questions@freebsd.org, joerg_wunsch@uriah.heep.sax.de Reply-To: freebsd-questions@freebsd.org In-Reply-To: <199509290958.CAA08560@freefall.freebsd.org> from "owner-freebsd-hackers@freefall.freebsd.org" at Sep 29, 95 02:58:19 am X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1413 Sender: owner-hackers@freebsd.org Precedence: bulk As owner-freebsd-hackers@freefall.freebsd.org wrote: > > We're currently developing a software on FreeBSD platform, and generally, > we are not really familiar with system calls. We were hoping you'd take > time out to answer these questions. Thanks! > > 1. Are system calls preemptive? I'm not exactly sure what you're meaning here, but if you're asking whether the scheduler could switch processes while one is inside a system call -- yes! this is a basic principle on every Unix installation. > 2. How do we create additional system calls? What exactly would you need it for? It's normally not a good idea to do it. Of course, you've got the source, so you can do what you want, but it's not the recommended procedure. Perhaps you would better use an existing system call and hook up a new driver? > 3. Do we have to recompile the whole kernel if we create additional > system calls? Normally yes, but you can also build a "loadable kernel module" (LKM). Sample code for how to do this is under /usr/share/examples. Note that on FreeBSD 2.0.5, all Makefiles under this directory are missing, and the source files are not buildable out of the box. So you might wish to grab more recent example files, e.g. from ftp.cdrom.com under FreeBSD-current. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)