Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Aug 2007 08:13:31 +0530 (IST)
From:      Saifi Khan <saifi@twincling.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: __sys_fcntl() definition ?
Message-ID:  <Pine.LNX.4.64.0708010808520.376@speed.localdomain>
In-Reply-To: <Pine.LNX.4.43.0707311400060.18226@hymn01.u.washington.edu>
References:  <Pine.LNX.4.43.0707311400060.18226@hymn01.u.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 31 Jul 2007, youshi10@u.washington.edu wrote:

> Date: Tue, 31 Jul 2007 14:00:06 -0700 (PDT)
> From:  <youshi10@u.washington.edu>
> To: Saifi Khan <saifi@twincling.org>
> Cc:  <freebsd-questions@freebsd.org>
> 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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.64.0708010808520.376>