From owner-freebsd-current Sun Feb 9 12:37:17 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 591AB37B401 for ; Sun, 9 Feb 2003 12:37:16 -0800 (PST) Received: from smtp-relay.omnis.com (smtp-relay.omnis.com [216.239.128.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA9AD43F93 for ; Sun, 9 Feb 2003 12:37:15 -0800 (PST) (envelope-from wes@softweyr.com) Received: from softweyr.homeunix.net (66-75-151-22.san.rr.com [66.75.151.22]) by smtp-relay.omnis.com (Postfix) with ESMTP id EC63D43289; Sun, 9 Feb 2003 12:37:14 -0800 (PST) From: Wes Peters Organization: Softweyr To: "Auge Mike" , current@freebsd.org Subject: Re: printf....! Date: Sun, 9 Feb 2003 13:36:05 +0000 User-Agent: KMail/1.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200302091336.05344.wes@softweyr.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Saturday 08 February 2003 22:12, Auge Mike wrote: > Hi all, > > I was trying to know how "printf" works in FreeBSD... I hvae reached to > this point : > > #define _write(fd, s, n) \ > __syscall(SYS_write, (int)(fd), (const void *)(s), (size_t)(n)) > > I'am not really familiar with the way FreeBSD handle interrupts. I like > from any one of you to tell me what functions will be called next and in > which files, till we get the string of the printf function argment > displayed in the terminal. This is the syscall (kernel entry) that implements the write(2) kernel function. Then next function will be in kernel space, and will be the handler for SYS_write, the 'write' function in sys/kern/sys_generic.c. By "handles interrupts" I assume you meant the syscall interface, right? -- Where am I, and what am I doing in this handbasket? Wes Peters wes@softweyr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message