diff options
| author | rsc <devnull@localhost> | 2004-12-27 16:52:26 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-12-27 16:52:26 +0000 |
| commit | 4dbefdd41ca866a10cee633a3ee9a67d9204b052 (patch) | |
| tree | ff9ba8d5c908864b8d7727dd33f9888247f465a1 /src/libthread/threadimpl.h | |
| parent | fd4655403059a7b5c042e3ba206b9f3f94b9f831 (diff) | |
start linux pre-2.6 port
Diffstat (limited to 'src/libthread/threadimpl.h')
| -rw-r--r-- | src/libthread/threadimpl.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/libthread/threadimpl.h b/src/libthread/threadimpl.h index e88e321c..d30d58b6 100644 --- a/src/libthread/threadimpl.h +++ b/src/libthread/threadimpl.h @@ -42,7 +42,11 @@ struct _Procrendez { Lock *l; int asleep; +#ifdef PLAN9PORT_USING_PTHREADS pthread_cond_t cond; +#else + int pid; +#endif }; extern void _procsleep(_Procrendez*); @@ -50,7 +54,14 @@ extern void _procwakeup(_Procrendez*); struct Proc { - pthread_t tid; + Proc *next; + Proc *prev; + char msg[128]; +#ifdef PLAN9PORT_USING_PTHREADS + pthread_t osprocid; +#else + uint osprocid; +#endif Lock lock; _Thread *thread; _Threadlist runqueue; @@ -63,10 +74,12 @@ struct Proc Jmp sigjmp; }; -extern Proc *xxx; #define proc() _threadproc() #define setproc(p) _threadsetproc(p) +extern Proc *_threadprocs; +extern Lock _threadprocslock; + extern void _procstart(Proc*, void (*fn)(Proc*)); extern _Thread *_threadcreate(Proc*, void(*fn)(void*), void*, uint); extern void _threadexit(void); |