Why use `thread' as an argument of Syscalls?

MingyanGuo guomingyan at gmail.com
Mon Jun 5 00:45:01 PDT 2006


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?

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


More information about the freebsd-arch mailing list