From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 02:17:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 511A016A4CE for ; Mon, 8 Nov 2004 02:17:29 +0000 (GMT) Received: from meketrex.pix.net (meketrex.pix.net [192.111.45.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6863E43D2D for ; Mon, 8 Nov 2004 02:17:28 +0000 (GMT) (envelope-from lidl@meketrex.pix.net) Received: (from lidl@localhost) by meketrex.pix.net (8.11.6/8.11.6) id iA82H2H07293; Sun, 7 Nov 2004 21:17:02 -0500 (EST) Date: Sun, 7 Nov 2004 21:17:02 -0500 From: "Kurt J. Lidl" To: Dan Strick Message-ID: <20041107211702.A7038@pix.net> Mail-Followup-To: Dan Strick , freebsd-hackers@freebsd.org, dan@mist.nodomain References: <200411080029.iA80TgJ0040646@mist.nodomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200411080029.iA80TgJ0040646@mist.nodomain>; from strick@covad.net on Sun, Nov 07, 2004 at 04:29:42PM -0800 X-Mailman-Approved-At: Mon, 08 Nov 2004 13:20:15 +0000 cc: freebsd-hackers@freebsd.org cc: dan@mist.nodomain Subject: Re: Where is the source to the system calls? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 02:17:29 -0000 On Sun, Nov 07, 2004 at 04:29:42PM -0800, Dan Strick wrote: > Does anyone know where the system calls are really defined? > I followed open() to _open() to __sys_open() which seems > to be part of something called libc_r before I ran into a > blank wall. I grepped all of the regular files in /usr/src > and /usr/include and turned up nothing. I even tried > grepping for open in the output of "nm -g /usr/lib/libc.a". > There is no __sys_open() in libc. Am I dealing with > C-compiler magic? Secret macro instructions invoking > undocumented gnu C-compiler asm() features? A CIA plot? > > Is any of this low level structure documented anywhere? Grok the following: /usr/src/lib/libc/sys/Makefile.inc /usr/src/sys/sys/syscall.mk -Kurt