Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jun 2006 17:48:46 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Suleiman Souhlal <ssouhlal@FreeBSD.org>
Cc:        Daniel Eischen <deischen@FreeBSD.org>, delphij@gmail.com, MingyanGuo <guomingyan@gmail.com>, Robert Watson <rwatson@FreeBSD.org>, freebsd-arch@FreeBSD.org
Subject:   Re: Why use `thread' as an argument of Syscalls? 
Message-ID:  <44258.1149522526@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 05 Jun 2006 17:42:53 %2B0200." <448450FD.4030709@FreeBSD.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <448450FD.4030709@FreeBSD.org>, Suleiman Souhlal writes:
>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?

Yes, mostly.

It's a good question how much, if anything, it helps.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



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