Fix select and poll use in LWPs.
authorSimon Schubert <corecode@dragonflybsd.org>
Thu, 2 Aug 2007 13:29:41 +0000 (13:29 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Thu, 2 Aug 2007 13:29:41 +0000 (13:29 +0000)
commitacb157c22380c39ecd7605aa35638c54dd67a93a
treeee133d44487541bd2704d91d799406c34ec3676c
parent01f859ec79333114581e8d55272973924e5c8ea5
Fix select and poll use in LWPs.

When select(2) or poll(2) puts to sleep a LWP, the LWP may never be woken up
when the events waited for occur because the TID of the LWP is not saved in
the selinfo structure by selrecord().

si_tid is not initialised explicitly anywhere but happens to bet set to 0, so
the problem was not apparent for the initial LWP created at process
construction time.

Submitted-by: Nicolas Thery <nthery@gmail.com>
DragonFly-bug: http://bugs.dragonflybsd.org/issue757
sys/kern/sys_generic.c