Date: Mon, 5 Jun 2006 21:08:04 +0800 From: MingyanGuo <guomingyan@gmail.com> To: "Daniel Eischen" <deischen@freebsd.org> Cc: delphij@gmail.com, freebsd-arch@freebsd.org Subject: Re: Why use `thread' as an argument of Syscalls? Message-ID: <1fa17f810606050608l5bd2ec5ch37663375f6fa5b64@mail.gmail.com> In-Reply-To: <Pine.GSO.4.64.0606050744190.13542@sea.ntplx.net> References: <1fa17f810606050044k2847e4a2i150eb934ed84006f@mail.gmail.com> <Pine.GSO.4.64.0606050744190.13542@sea.ntplx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6/5/06, Daniel Eischen <deischen@freebsd.org> wrote:
>
> On Mon, 5 Jun 2006, MingyanGuo wrote:
>
> > Hi all,
> > I find that FreeBSD Syscalls always have an `thread'
> > argument, for example, preadv(/sys/kern/sys_generic.c)
> > has a `td' argument. But some Syscalls may rarely use
> > this argument, and thay ( and functions they invoke) can
> > get the `thread' who make the Syscall _easily_ via
> > `curthread' macro if needed. So the `thread' argument
> > seems not needed.
> > Can anybody tell me why use `thread' as an argument
> > of Syscalls?
>
> You could have asked "why use 'proc' as an argument of Syscalls"
> 12 years ago (or more). When the kernel became thread-aware
> (almost 5 years ago), most 'struct proc' arguments were changed
> to 'struct thread'.
>
> --
> DE
>
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.
Thanks.
Regards,
--
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?1fa17f810606050608l5bd2ec5ch37663375f6fa5b64>
