diff options
author | rsc <devnull@localhost> | 2004-12-26 21:51:15 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-12-26 21:51:15 +0000 |
commit | 5f8fa94796903bf81db4f1dc76d433a80308b3d4 (patch) | |
tree | bc94c36965c4bf6cdb420c4c5fe628024647f88e /src/lib9/ffork-pthread.c | |
parent | b2ff5382580e13d82ca48966c9d79d3318865cba (diff) | |
download | plan9port-5f8fa94796903bf81db4f1dc76d433a80308b3d4.tar.gz plan9port-5f8fa94796903bf81db4f1dc76d433a80308b3d4.tar.bz2 plan9port-5f8fa94796903bf81db4f1dc76d433a80308b3d4.zip |
cleanups - lots of removed files now in thread library.
qlock.c - stubs to thread library
notify.c - clean interface slightly.
Diffstat (limited to 'src/lib9/ffork-pthread.c')
-rw-r--r-- | src/lib9/ffork-pthread.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/lib9/ffork-pthread.c b/src/lib9/ffork-pthread.c deleted file mode 100644 index c89ad138..00000000 --- a/src/lib9/ffork-pthread.c +++ /dev/null @@ -1,31 +0,0 @@ -#define NOPLAN9DEFINES -#include <u.h> -#include <libc.h> -#include <pthread.h> -#include "9proc.h" - -extern int __isthreaded; -int -ffork(int flags, void(*fn)(void*), void *arg) -{ - pthread_t tid; - - if(flags != (RFMEM|RFNOWAIT)){ - werrstr("ffork unsupported"); - return -1; - } - - _p9uproc(0); - if(pthread_create(&tid, NULL, (void*(*)(void*))fn, arg) < 0) - return -1; - if((int)tid == 0) - _p9uproc(0); - return (int)tid; -} - -int -getfforkid(void) -{ - return (int)pthread_self(); -} - |