Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Nov 2006 15:28:46 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Christopher Olsen <cwolsen@domainatlantic.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: PRINTF, STDOUT
Message-ID:  <Pine.GSO.4.64.0611301524520.27732@sea.ntplx.net>
In-Reply-To: <200611301954.47319.cwolsen@domainatlantic.com>
References:  <200611301954.47319.cwolsen@domainatlantic.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 30 Nov 2006, Christopher Olsen wrote:

> Hello,
>
> I've been tracing the printf function from the FreeBSD 6.x libc... I'm trying
> to figure out what mechanism transfers the data from the processes FILE to
> the system so it's written out to the screen...
>
>> From my findings I get to a function __sfvwrite(FILE,buf) {}
>
> however this just copies into the FILE's buffer and there are no systems
> between this point and returning back from the printf call

   __sfvwrite() -> __fflush() -> __sflush -> _swrite() ->
     (via fp->_write) __swrite() -> _write()

Note that _write() is a weak reference to __sys_write() which
is the actual system call.

-- 
Dan



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