kqueue events
Lev Walkin
vlm at netli.com
Tue Apr 22 10:59:54 PDT 2003
Kevin A. Pieckiel wrote:
> Will the kqueue interface work with pthread ID's, or is it limited
> only to system process ID's? If it doesn't work with pthread ID's,
> how much trouble is it to modify them and add a pthread ID filter?
What are you trying to achieve, by the way?
Basically, for the FBSD versions < 5.0 there are two forms of
threads available: basic (libc_r) pthreads and linuxthreads from ports.
The first type (user-level threads) does the context switching and
all the relevant thread management stuff in the user space, so kernel
just doesn't have enough information to supply any kind of per-thread-ID
notifications with kqueue system call. However, kqueue wrapper in
libc_r could be enhanced to support this kind of stuff (it would be
a purely user-level library hack).
The second type (rfork()-based) is slightly better for you: kqueue
should support this natively (system pids are different per each
"thread"), and you don't have to modify any default libraries and/or
kernel.
For 5.0 it seems to be quite a bit more complicated task in every
respect.
--
Lev Walkin
vlm at netli.com
More information about the freebsd-hackers
mailing list