From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 30 20:31:25 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8557B16A407 for ; Thu, 30 Nov 2006 20:31:25 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C458943E86 for ; Thu, 30 Nov 2006 20:28:54 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.8/8.13.8/NETPLEX) with ESMTP id kAUKSkaJ016819; Thu, 30 Nov 2006 15:28:46 -0500 (EST) Date: Thu, 30 Nov 2006 15:28:46 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Christopher Olsen In-Reply-To: <200611301954.47319.cwolsen@domainatlantic.com> Message-ID: References: <200611301954.47319.cwolsen@domainatlantic.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-2.0.2 (mail.ntplx.net [204.213.176.10]); Thu, 30 Nov 2006 15:28:46 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-hackers@freebsd.org Subject: Re: PRINTF, STDOUT X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2006 20:31:25 -0000 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