whether there is anything to do - almost as if it were a predicate
test outside of a condition wait. This prevents returning to userland
when tsleep() has woken up spuriously, such as from a signal that was
caught and then removed by a tracing process.
Kills off some double-stops in GDB due to signals as well as a couple
of pthread__idle assertions when detaching from a process.
XXX stopping inside tsleep, via CURSIG(), is evil.
(XXX sa_yieldcall() and sa_switchcall() should be combined and take
arg as the function to call, but I'm somewhat nervous about void *
vs. void (*)()).
use 'l' for sa_yield() tsleep call; sa->sa_idle == l there
add DIAGNOSTIC printf on one more place in sa_upcall_userret() where
we kill process with SIGILL
being woken up by the the reaper when a child process is cleaned up
(SIGCHLD will still cause this to run, and threads actually waiting
for the child will still see the wakeup, of course).
Should fix various spurious wakeups that manifest as assertion
failures in pthread__idle().
malloc types into a structure, a pointer to which is passed around,
instead of an int constant. Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.