Commit Graph

17 Commits

Author SHA1 Message Date
fvdl 091ff13b7b Move nstacks assertion and stack assignment to an earlier time, before
the sa_vp_repossess call. From Stephan Uphoff.
2003-07-17 20:34:41 +00:00
fvdl 4bd1a8dcf8 Changes from Stephan Uphoff to patch problems with LWPs blocking when they
shouldn't, and MP.
2003-07-17 18:16:58 +00:00
nathanw 998110e1d0 Put the tsleep() call in sa_yield() inside a while loop that tests
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.
2003-05-28 22:17:20 +00:00
kristerw 7941ff4225 Use 0 instead of NULL for size parameters. 2003-05-21 17:57:21 +00:00
nathanw f7905a50d4 Clear L_SA duting sa_upcall_userret(); faults encountered while
reporting an upcall are not of interest and just cause trouble.
2003-05-19 21:02:31 +00:00
tsutsui d6458621a3 Fix too many arguments for format warning in #ifdef DIAGNOSTIC part
detected by gcc-3.x.
2003-02-22 12:42:28 +00:00
skrll e8f64a20cb typo in comment. 2003-02-21 16:30:48 +00:00
nathanw a87506d477 Note yet another SMP danger spot. 2003-02-17 23:32:33 +00:00
nathanw 49f53e20ea Make sa_yieldcall also allocate a new LWP for the cache if it's empty.
(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 (*)()).
2003-02-14 20:45:12 +00:00
nathanw 158b157b2a Move stack allocation in case 1 of sa_switch() to after the
sau == NULL check, to avoid a stack leak in the error case.

Spotted by enami.
2003-02-11 00:03:47 +00:00
nathanw 695bc028ab Since sadata_upcall_alloc(1) can sleep, call it before checking the
supply of stacks, to avoid a race. Problem pointed out by Lars
Heidieker on current-users.
2003-02-10 19:02:52 +00:00
briggs c17a890fc8 Fix DIAGNOSTIC printf format. 2003-02-05 15:38:14 +00:00
jdolecek f02bf3cc39 add XXX coment to sadata_upcall_alloc() noting this might need to zero memory
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
2003-02-04 15:54:26 +00:00
nathanw 6722952b21 In sa_yield(), sleep on a p->p_sa->sa_idle instead of just p, to avoid
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().
2003-02-03 23:31:42 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
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.
2003-02-01 06:23:35 +00:00
scw 34db3d4652 Cast integer to pointer via intptr_t. 2003-01-19 12:59:59 +00:00
thorpej e0d8d366df Merge the nathanw_sa branch. 2003-01-18 10:06:22 +00:00