From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 3 13:50:14 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44D4410656CE for ; Wed, 3 Feb 2010 13:50:14 +0000 (UTC) (envelope-from dmw@coder.cl) Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.210.172]) by mx1.freebsd.org (Postfix) with ESMTP id DB89A8FC13 for ; Wed, 3 Feb 2010 13:50:10 +0000 (UTC) Received: by yxe2 with SMTP id 2so1075794yxe.7 for ; Wed, 03 Feb 2010 05:50:10 -0800 (PST) Received: by 10.90.155.9 with SMTP id c9mr3361282age.38.1265203447053; Wed, 03 Feb 2010 05:24:07 -0800 (PST) Received: from coder-cl.no-ip.org ([201.215.99.33]) by mx.google.com with ESMTPS id 15sm4745079gxk.8.2010.02.03.05.24.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Feb 2010 05:24:06 -0800 (PST) From: Daniel Molina Wegener Organization: http://coder.cl/ To: freebsd-hackers@freebsd.org Date: Wed, 3 Feb 2010 10:23:50 -0300 User-Agent: KMail/1.12.4 (Linux/2.6.31-17-generic; KDE/4.3.5; i686; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4926493.zaeND525Xq"; protocol="application/pgp-signature"; micalg=pgp-sha512 Content-Transfer-Encoding: 7bit Message-Id: <201002031024.03835.dmw@coder.cl> Subject: Re: Does getc(3) use the read(2) syscall? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@coder.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 13:50:14 -0000 --nextPart4926493.zaeND525Xq Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Wednesday 03 February 2010, Stefan Midjich 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 | | 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--