Date: Wed, 3 Feb 2010 10:23:50 -0300 From: Daniel Molina Wegener <dmw@coder.cl> To: freebsd-hackers@freebsd.org Subject: Re: Does getc(3) use the read(2) syscall? Message-ID: <201002031024.03835.dmw@coder.cl> In-Reply-To: <e0e25d5e1002030326p5e0ef0a1q5ebc77a4e1c69b7c@mail.gmail.com> References: <e0e25d5e1002030326p5e0ef0a1q5ebc77a4e1c69b7c@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Wednesday 03 February 2010, Stefan Midjich <swehack@gmail.com> 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. > > 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. > > But i would also love it if someone could show me where __sys_read is > defined. Take a look on the architecture specific file SYS.h, that's a kind of macro. For example at the i386 file: lib/libc/i386/SYS.h > > Thanks in advance for any information! > Best regards, -- | Daniel Molina <dmw [at] coder [dot] cl> | | IT Consulting & Software Development | | Phone: +56 2 9790277 | http://coder.cl/ | [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAABCgAGBQJLaXjmAAoJEHxqfq6Y4O5N/lUQALvyCmbJo1Frj2IMOGejn7sZ 0j48Wd3XQCRkFir9vaUnF3ar7HI6FYDf2b8cp5eav/Qntfk8Y6z7Vzw7YsfqdhC+ M2FeLkpbaGknMpcDp59xni4c3FnGYDuw6dYNQxswwj+sG6BD2L1vUnDWIjeuDks4 WkcFm0hHiVsVdMcxvt+xOpO3g+9fiflqqp0sItyl/0b8Cv+MIgzvirvASnobh/ej zSsjC+HBwV9JrWFqYiokPopQLE3Md+5MHajI5vP1tDYAUzG/DZItGGhBzq2rLbxF 7oW1BfNPKoZqpSTq3Q2M4rg+mYA9nvWpfj9bcuPal9C7Gmlss+RpE251GbCP42uR WnGQpikOtm1xPu9piDPv9ECG7wMAcsCYDNogl5YtxP7WWTFXtsmWBPeaLQR3TMCI 8UX1fmVbkGJ5j+RBV29FmVQXieEzDo0Zh+PcDIHFKbGgyDgV83JLU8X8rYuVvKpO IIUeo9ofcsg1LzzNBZtkvvgW5fyzdyK0J2+kYBqXKIt3zXuZ2zOxNRrMmXff2mcz 31EzeTN5+iSIlaOrrP4suPabMJTQjKbNHCCxaz+S216pnI7lGzbhYIjR2caNQ15I 93SI1vnvty2qcgkCM30aFVs4Hgepxo/0B5VNwWpydUFR0PX9J4avfmJ94xMzn0Pn h020XbY+i0a8HwsiJ7Vt =2mkU -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002031024.03835.dmw>
