From 5b2b2811a19544037b626ef44e598691b3b2f525 Mon Sep 17 00:00:00 2001 From: jake Date: Thu, 3 Apr 2003 03:34:50 +0000 Subject: - Pass a ucontext_t to _set_curthread. If non-NULL the new thread is set as curthread in the new context, so that it will be set automatically when the thread is switched to. This fixes a race where we'd run for a little while with curthread unset in _thread_start. Reviewed by: jeff --- lib/libthr/thread/thr_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libthr/thread/thr_init.c') diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 6a6fd45..1a0c648 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -219,7 +219,7 @@ _thread_init(void) PANIC("Cannot allocate memory for initial thread"); } _thread_initial = pthread; - pthread->arch_id = _set_curthread(pthread); + pthread->arch_id = _set_curthread(NULL, pthread); /* Zero the initial thread structure: */ memset(pthread, 0, sizeof(struct pthread)); -- cgit v1.1