Commit Graph

14 Commits

Author SHA1 Message Date
cl 677748c645 logging/debugging changes:
- add PTHREAD_PID_DEBUG which prints the pid before each debuglog line
- output thread returned in pthread__next
- add asserts in pthread__sched akin to asserts in pthread__sched_bulk:
  check if scheduled thread is at front/end of queue
- pthread__upcall: output event/interrupted LWP count instead of LWPid
  of the first event/interrupted LWP (since unblock upcalls can have
  multiple event LWPs).
- pthread__find_interrupted: output LWPid here
2004-01-02 14:13:16 +00:00
christos 1edf98ec41 Add pthread_{g,s}etschedparam, that do nothing. 2003-12-07 20:29:07 +00:00
christos 38b1c6f405 Add:
int    pthread_attr_setcreatesuspend_np(pthread_attr_t *);
int    pthread_suspend_np(pthread_t);
int    pthread_resume_np(pthread_t);

needed for java. Approved and fixed by cl.
2003-11-09 18:56:48 +00:00
cl 5c40d56471 fix SA/pthread pagefault failure:
- prevent BLOCKED upcalls on double page faults and during upcalls
- make libpthread handle blocked threads which hold locks
- prevent UNBLOCKED upcalls from overtaking their BLOCKED upcall
this adds a new syscall sa_unblockyield
see also http://mail-index.netbsd.org/tech-kern/2003/09/15/0020.html
2003-09-16 13:51:31 +00:00
nathanw 1af6125572 Clear pt_trapuc when idling threads. 2003-06-26 01:26:39 +00:00
christos 143f5a277a pass lint:
1. add new pthread__abort() and change pthread_assert(0) to it.
2. put constcond in the right place (in the macro).
3. no space after pthread__assert macro.
2003-05-27 15:24:24 +00:00
nathanw 4777259ff2 Don't call pthread__locked_switch() to switch to ourself. Bad stack
mangling results.

Fixes regression in test yield2, dating to 2003/1/2 when
pthread__locked_switch() was changed to not store the saved-context
pointer until after switching stacks.

Note to self: regression tests exist to be run.
2003-04-04 01:08:25 +00:00
lukem f043c0fb57 add __RCSID() 2003-03-08 08:03:34 +00:00
nathanw 53827081be Adapt to pthread__assert() and remove local debug toggle. 2003-02-15 04:37:04 +00:00
tron 8cf036775b Add a missing bracket to make this compile. 2003-01-31 12:27:19 +00:00
nathanw 029982e17b Add a new internal function, pthread__sched_sleepers(), which iterates
over a sleep queue and puts everything on the run queue. This permits
the iteration to be inside the acquisition of the run queue spinlock,
avoiding repetitive acquire/release cycles.
2003-01-31 04:58:57 +00:00
nathanw 7d8ac1f6c2 Set a thread's state to RUNNABLE when yielding. 2003-01-30 01:00:58 +00:00
thorpej 7dc01dbfab Add some threadlib stubs that are used by X:
* thr_create() (stub in libc aborts)
* thr_exit() (stub in libc calls exit())
* thr_yield() (stub in libc does nothing)

Also make the libc thr_self() stub not abort.

XXX Should we add thrattr_*() stubs for setting the detach-state?
2003-01-19 21:58:21 +00:00
thorpej c62a74e6d5 Merge the nathanw_sa branch. 2003-01-18 10:32:11 +00:00