Date: Tue, 6 Jun 2006 00:30:09 +0800 From: MingyanGuo <guomingyan@gmail.com> To: freebsd-arch@freebsd.org Cc: delphij@gmail.com Subject: Re: Why use `thread' as an argument of Syscalls? Message-ID: <1fa17f810606050930g407d622frd3568cf8036191b5@mail.gmail.com> In-Reply-To: <1fa17f810606050921n44da78d6y52f41279a0c1396b@mail.gmail.com> 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> <20060605163559.N50057@fledge.watson.org> <1fa17f810606050921n44da78d6y52f41279a0c1396b@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6/5/06, Robert Watson <rwatson@freebsd.org> 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. > > Robert N M Watson > Thanks for your reply. And any more reasons? I have browsed some OpenSolaris and Linux source, and find that they get the `proc'/`thread'/`task' by `curproc'/`curthread'/`current' like macros when needed, which are different from FreeBSD. So I wanna know why FreeBSD do it in this way, has some mysterious reasons;-)? or not. Thanks Regards, MingyanGuo -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1fa17f810606050930g407d622frd3568cf8036191b5>