3 typedef struct Context Context;
4 typedef struct Execjob Execjob;
5 typedef struct Proc Proc;
6 typedef struct _Procrendez _Procrendez;
8 typedef struct Jmp Jmp;
43 void (*startfn)(void*);
54 #ifdef PLAN9PORT_USING_PTHREADS
61 extern void _procsleep(_Procrendez*);
62 extern void _procwakeup(_Procrendez*);
69 #ifdef PLAN9PORT_USING_PTHREADS
78 _Threadlist allthreads;
87 #define proc() _threadproc()
88 #define setproc(p) _threadsetproc(p)
90 extern Proc *_threadprocs;
91 extern Lock _threadprocslock;
92 extern Proc *_threadexecproc;
93 extern Channel *_threadexecchan;
94 extern QLock _threadexeclock;
95 extern Channel *_dowaitchan;
97 extern void _procstart(Proc*, void (*fn)(Proc*));
98 extern _Thread *_threadcreate(Proc*, void(*fn)(void*), void*, uint);
99 extern void _threadexit(void);
100 extern Proc *_threadproc(void);
101 extern void _threadsetproc(Proc*);
102 extern int _threadlock(Lock*, int, ulong);
103 extern void _threadunlock(Lock*, ulong);
104 extern void _pthreadinit(void);
105 extern int _threadspawn(int*, char*, char**);
106 extern int _runthreadspawn(int*, char*, char**);
107 extern void _threadsetupdaemonize(void);
108 extern void _threaddodaemonize(char*);