From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 00:29:46 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 ACC3A16A4CE for ; Mon, 8 Nov 2004 00:29:46 +0000 (GMT) Received: from mail825.megamailservers.com (mail825.carrierinternetsolutions.com [69.49.106.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D6F343D31 for ; Mon, 8 Nov 2004 00:29:46 +0000 (GMT) (envelope-from strick@covad.net) X-POP-User: strick.covad.net Received: from mist.nodomain (h-67-101-98-53.snfccasy.dynamic.covad.net [67.101.98.53])iA80Tgg5005123 for ; Sun, 7 Nov 2004 19:29:43 -0500 Received: from mist.nodomain (localhost [127.0.0.1]) by mist.nodomain (8.12.11/8.12.11) with ESMTP id iA80TgA6040647; Sun, 7 Nov 2004 16:29:42 -0800 (PST) (envelope-from dan@mist.nodomain) Received: (from dan@localhost) by mist.nodomain (8.12.11/8.12.11/Submit) id iA80TgJ0040646; Sun, 7 Nov 2004 16:29:42 -0800 (PST) (envelope-from dan) Date: Sun, 7 Nov 2004 16:29:42 -0800 (PST) From: Dan Strick Message-Id: <200411080029.iA80TgJ0040646@mist.nodomain> To: freebsd-hackers@freebsd.org cc: dan@mist.nodomain Subject: 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 00:29:46 -0000 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? Dan Strick strick@covad.net