On Wed, Feb 03, 2010 at 10:23:50AM -0300, Daniel Molina Wegener wrote:
> > I'm having trouble looking this function up in the source tree, the trail
> > seems to end at __sys_read which has a bunch of prototypes but i can't find
> > the actual function code.
> 
>   Well, you can try cscope --- IMO the best option to
> search for symbols in the source tree. Also you have
> well done front-ends like cbrowser, codelite and emacs
> plus cscope mode.

Works wonders in vim as well. :-)

> > So my question is primarily, does getc use the read system call eventually?
> 
>   No, certainly not. Take a look on stdio.h and libc
> implementation on lib/libc/stdio/getc.c. Mainly on the
> __sgetc(f) macro.

If you follow macros long enough, you'll find that it obviously does use
the read system call. read, readv, pread, preadv are basicly the system
calls through which all normal reads take place.

Marc

Attachment: signature.asc
Description: Digital signature

Reply via email to