From owner-freebsd-questions@FreeBSD.ORG Wed Aug 1 20:28:52 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E67E16A419 for ; Wed, 1 Aug 2007 20:28:52 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 2C44413C46E for ; Wed, 1 Aug 2007 20:28:41 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.1/8.14.1) id l6VK8QvF063812; Tue, 31 Jul 2007 15:08:26 -0500 (CDT) (envelope-from dan) Date: Tue, 31 Jul 2007 15:08:26 -0500 From: Dan Nelson To: Saifi Khan Message-ID: <20070731200826.GB8962@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 7.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-questions@freebsd.org Subject: Re: __sys_fcntl() definition ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2007 20:28:52 -0000 In the last episode (Aug 01), Saifi Khan said: > While working through the FreeBSD 6.2 codebase, I saw the following > functions referred at multiple places. > > __sys_fcntl() > __sys_open() > __sys_write() > ... > > Can somebody point out the file which contains the implementation > of the __sys_* functions ? Those are stub functions that invoke the equivalent syscall in the kernel. The "${SASM}:" rule in /usr/src/lib/libc/sys/Makefile.inc is what generates the stubs themselves. The actual code for most syscalls in the kernel is in /usr/src/sys/kern/ . -- Dan Nelson dnelson@allantgroup.com