From 1544f90960275dc9211bde30329c3258e0e1bf38 Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 25 Dec 2004 21:56:33 +0000 Subject: New thread library --- src/libthread/exit.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/libthread/exit.c (limited to 'src/libthread/exit.c') diff --git a/src/libthread/exit.c b/src/libthread/exit.c deleted file mode 100644 index 69f3f738..00000000 --- a/src/libthread/exit.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include "threadimpl.h" - -char *_threadexitsallstatus; -Channel *_threadwaitchan; - -void -threadexits(char *exitstr) -{ - Proc *p; - Thread *t; - - p = _threadgetproc(); - t = p->thread; - if(t == p->idle) - p->idle = nil; - t->moribund = 1; - _threaddebug(DBGSCHED, "threadexits %s", exitstr); - if(exitstr==nil) - exitstr=""; - utfecpy(p->exitstr, p->exitstr+ERRMAX, exitstr); - _sched(); -} - -void -threadexitsall(char *exitstr) -{ - _threaddebug(DBGSCHED, "threadexitsall %s", exitstr); - if(exitstr == nil) - exitstr = ""; - _threadexitsallstatus = exitstr; - _threaddebug(DBGSCHED, "_threadexitsallstatus set to %p", _threadexitsallstatus); - /* leave */ - _kthreadexitallproc(exitstr); -} - -Channel* -threadwaitchan(void) -{ - if(_threadwaitchan==nil) - _threadwaitchan = chancreate(sizeof(Waitmsg*), 16); - return _threadwaitchan; -} -- cgit v1.2.3