Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jun 2006 11:42:59 -0400 (EDT)
From:      Garrett Wollman <wollman@khavrinen.csail.mit.edu>
To:        rwatson@freebsd.org
Cc:        , arch@freebsd.org
Subject:   Re: Why use `thread' as an argument of Syscalls?
Message-ID:  <200606051542.k55Fgx9V079169@khavrinen.csail.mit.edu>
In-Reply-To: <20060605163559.N50057@fledge.watson.org>
References:  <1fa17f810606050044k2847e4a2i150eb934ed84006f@mail.gmail.com> <Pine.GSO.4.64.0606050744190.13542@sea.ntplx.net> <1fa17f810606050608l5bd2ec5ch37663375f6fa5b64@mail.gmail.com> <Pine.GSO.4.64.0606051118180.14745@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson writes:

>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.

I believe it was the intention of the 4.4BSD developers to completely
eliminate "curproc" (as they had already successfully eliminated "u"),
on the theory that with a modern (RISC) processor architecture,
passing the current process as a parameter wouldn't cost anything
(since it would stay in a register for the life of the system call)
whereas making a context-switched "curproc" would be expensive.

-GAWollman




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606051542.k55Fgx9V079169>