diff options
author | dt <dt@FreeBSD.org> | 1998-10-09 19:01:30 +0000 |
---|---|---|
committer | dt <dt@FreeBSD.org> | 1998-10-09 19:01:30 +0000 |
commit | a3544f2edb31acfc1c2fec1e96e88f423e51a57f (patch) | |
tree | 17a570d16886224bb1e0981ddfc2971902a7a7ac /lib/libpthread/thread/thr_create.c | |
parent | b9c44f55137fecbbad921b314afe7b67556bd3c0 (diff) | |
download | FreeBSD-src-a3544f2edb31acfc1c2fec1e96e88f423e51a57f.zip FreeBSD-src-a3544f2edb31acfc1c2fec1e96e88f423e51a57f.tar.gz |
Fix some bugs in pthread scheduler:
make pthread_yield() more reliable,
threads always (I hope) preempted at least every 0.1 sec, as intended.
PR: bin/7744
Submitted by: "Richard Seaman, Jr." <dick@tar.com>
Diffstat (limited to 'lib/libpthread/thread/thr_create.c')
-rw-r--r-- | lib/libpthread/thread/thr_create.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c index c7ddeb2..4169461 100644 --- a/lib/libpthread/thread/thr_create.c +++ b/lib/libpthread/thread/thr_create.c @@ -223,6 +223,9 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr, void _thread_start(void) { + /* We just left the scheduler via longjmp: */ + _thread_kern_in_sched = 0; + /* Run the current thread's start routine with argument: */ pthread_exit(_thread_run->start_routine(_thread_run->arg)); |