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>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart4926493.zaeND525Xq Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 fi= nd > 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. >=20 > So my question is primarily, does getc use the read system call eventuall= y? No, certainly not. Take a look on stdio.h and libc implementation on lib/libc/stdio/getc.c. Mainly on the __sgetc(f) macro. >=20 > 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 >=20 > Thanks in advance for any information! >=20 Best regards, =2D-=20 | Daniel Molina <dmw [at] coder [dot] cl> | | IT Consulting & Software Development | | Phone: +56 2 9790277 | http://coder.cl/ | --nextPart4926493.zaeND525Xq Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----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----- --nextPart4926493.zaeND525Xq--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002031024.03835.dmw>