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/setproc.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/libthread/setproc.c (limited to 'src/libthread/setproc.c') diff --git a/src/libthread/setproc.c b/src/libthread/setproc.c deleted file mode 100644 index 5f1e2a8d..00000000 --- a/src/libthread/setproc.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Avoid using threading calls for single-proc programs. - */ - -#include "threadimpl.h" - -static int multi; -static Proc *theproc; - -void -_threadsetproc(Proc *p) -{ - if(!multi) - theproc = p; - else - _kthreadsetproc(p); -} - -Proc* -_threadgetproc(void) -{ - if(!multi) - return theproc; - return _kthreadgetproc(); -} - -void -_threadmultiproc(void) -{ - if(multi) - return; - - multi = 1; - _kthreadinit(); - _threadsetproc(theproc); -} -- cgit v1.2.3