diff options
author | rsc <devnull@localhost> | 2004-12-25 21:56:33 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-12-25 21:56:33 +0000 |
commit | 1544f90960275dc9211bde30329c3258e0e1bf38 (patch) | |
tree | f55e7a73c03aaa24daa7cc2ad02822b921c477f9 /src/libthread/setproc.c | |
parent | 7788fd54094693384ef5c92c475656dba8819feb (diff) | |
download | plan9port-1544f90960275dc9211bde30329c3258e0e1bf38.tar.gz plan9port-1544f90960275dc9211bde30329c3258e0e1bf38.tar.bz2 plan9port-1544f90960275dc9211bde30329c3258e0e1bf38.zip |
New thread library
Diffstat (limited to 'src/libthread/setproc.c')
-rw-r--r-- | src/libthread/setproc.c | 36 |
1 files changed, 0 insertions, 36 deletions
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); -} |