From owner-freebsd-arch@FreeBSD.ORG Mon Jun 5 15:43:48 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4804116A51F; Mon, 5 Jun 2006 15:43:48 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07C4B43D45; Mon, 5 Jun 2006 15:43:47 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [172.30.10.163] (unknown [216.239.55.7]) by elvis.mu.org (Postfix) with ESMTP id C87BD1A4D86; Mon, 5 Jun 2006 08:43:46 -0700 (PDT) Message-ID: <448450FD.4030709@FreeBSD.org> Date: Mon, 05 Jun 2006 17:42:53 +0200 From: Suleiman Souhlal User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: <1fa17f810606050044k2847e4a2i150eb934ed84006f@mail.gmail.com> <1fa17f810606050608l5bd2ec5ch37663375f6fa5b64@mail.gmail.com> <20060605163559.N50057@fledge.watson.org> In-Reply-To: <20060605163559.N50057@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , MingyanGuo , delphij@gmail.com, freebsd-arch@freebsd.org Subject: Re: Why use `thread' as an argument of Syscalls? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2006 15:43:55 -0000 Robert Watson wrote: > > On Mon, 5 Jun 2006, Daniel Eischen wrote: > >>> They are the same questions, I think ;-). Now would you please >>> explain "why use `proc' as an argument of Syscalls" to me :)? I've >>> read some source code of the kernel, but no comments about it found. >> >> >> I don't know. Convention? It makes sense to me. > > > Certainly consistency. Most system calls do actually use the argument > at some point -- be it to look up a file descriptor, access control, or > the like, and the calling context has it for free and in-hand anyway. But couldn't they just use curthread/curproc? -- Suleiman