From a4799ae63ccc20098591b8ddfd0e6d90ea031503 Mon Sep 17 00:00:00 2001 From: "Todd T. Fries" Date: Thu, 30 Aug 2001 17:47:58 +0000 Subject: Back out fgsch@'s tree breaking commits. Test next time, ok? --- lib/libpthread/uthread/uthread_init.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/libpthread/uthread/uthread_init.c') diff --git a/lib/libpthread/uthread/uthread_init.c b/lib/libpthread/uthread/uthread_init.c index dec4cdace6d..f5260f544c0 100644 --- a/lib/libpthread/uthread/uthread_init.c +++ b/lib/libpthread/uthread/uthread_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_init.c,v 1.14 2001/08/30 07:40:47 fgsch Exp $ */ +/* $OpenBSD: uthread_init.c,v 1.15 2001/08/30 17:47:57 todd Exp $ */ /* * Copyright (c) 1995-1998 John Birrell * All rights reserved. @@ -57,6 +57,7 @@ #include "pthread_private.h" /* Global thread variables. */ +struct timeval kern_inc_prio_time = { 0, 0 }; _stack_list_t _stackq; extern int _thread_autoinit_dummy_decl; @@ -174,10 +175,6 @@ _thread_init(void) */ _thread_initial->magic = PTHREAD_MAGIC; - /* Set the initial cancel state */ - _thread_initial->cancelstate = PTHREAD_CANCEL_ENABLE; - _thread_initial->canceltype = PTHREAD_CANCEL_DEFERRED; - /* Default the priority of the initial thread: */ _thread_initial->base_priority = PTHREAD_DEFAULT_PRIORITY; _thread_initial->active_priority = PTHREAD_DEFAULT_PRIORITY; @@ -207,10 +204,12 @@ _thread_init(void) _thread_initial->cleanup = NULL; _thread_initial->flags = 0; _thread_initial->error = 0; + _thread_initial->cancelstate = PTHREAD_CANCEL_ENABLE; + _thread_initial->canceltype = PTHREAD_CANCEL_DEFERRED; _SPINLOCK_INIT(&_thread_initial->lock); TAILQ_INIT(&_thread_list); TAILQ_INSERT_HEAD(&_thread_list, _thread_initial, tle); - _set_curthread(_thread_initial); + _thread_run = _thread_initial; /* Initialise the global signal action structure: */ sigfillset(&act.sa_mask); @@ -228,16 +227,13 @@ _thread_init(void) /* Get the signal handler details: */ else if (_thread_sys_sigaction(i, NULL, - &_thread_sigact[i - 1]) != 0) { + &_thread_sigact[i - 1]) != 0) { /* * Abort this process if signal * initialisation fails: */ PANIC("Cannot read signal handler info"); } - - /* Initialize the SIG_DFL dummy handler count. */ - _thread_dfl_count[i] = 0; } /* @@ -312,6 +308,10 @@ _thread_init(void) pthread_cond_init(&_gc_cond,NULL) != 0) PANIC("Failed to initialise garbage collector mutex or condvar"); + gettimeofday(&kern_inc_prio_time, NULL); + _thread_autoinit_dummy_decl = 0; + + return; } #endif -- cgit v1.2.3