From owner-freebsd-questions@FreeBSD.ORG Wed Aug 1 02:37:58 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 4CBDE16A41A for ; Wed, 1 Aug 2007 02:37:58 +0000 (UTC) (envelope-from saifi@twincling.org) Received: from coolhost77.com (coolhost77.com [203.194.209.191]) by mx1.freebsd.org (Postfix) with ESMTP id AD6DA13C480 for ; Wed, 1 Aug 2007 02:37:57 +0000 (UTC) (envelope-from saifi@twincling.org) Received: (qmail 18310 invoked by uid 503); 1 Aug 2007 02:38:34 -0000 Received: from unknown (HELO ?192.168.1.253?) (saifi@twincling.org@60.243.229.134) by coolhost77.com with ESMTPA; 1 Aug 2007 02:38:34 -0000 Date: Wed, 1 Aug 2007 08:13:31 +0530 (IST) From: Saifi Khan X-X-Sender: saifi@speed.localdomain To: freebsd-questions@freebsd.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 02:37:58 -0000 On Tue, 31 Jul 2007, youshi10@u.washington.edu wrote: > Date: Tue, 31 Jul 2007 14:00:06 -0700 (PDT) > From: > To: Saifi Khan > Cc: > Subject: Re: __sys_fcntl() definition ? > > On Wed, 1 Aug 2007, Saifi Khan wrote: > > > Hi: > > > > 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 ? > > > > Thanks in advance. > > > > thanks > > Saifi. > > They're standard C library headers: > > man 2 fcntl > man 2 open > man 2 write > > Cheers, > -Garrett > Hello Garrett: In src/lib/libc/include/namespace.h (on line 64) #define fcntl _fcntl If you look at the _fcntl() definition on line 43 in src/lib/libc_r/uthread/uthread_fcntl.c you will see on line 66 the following code /* Initialise the file descriptor table entry: */ if ((ret = __sys_fcntl(fd, cmd, oldfd)) < 0) { My question is that where is the function definition for this __sys_fcntl() ? Thanks in advance. thanks Saifi. TWINCLING Society freedom of innovation http://www.twincling.org/