mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
add threadid
This commit is contained in:
parent
1b404fe6e4
commit
9eda38e51f
2 changed files with 10 additions and 0 deletions
|
@ -23,6 +23,7 @@ void _threadsetsysproc(void);
|
|||
void _threadsleep(Rendez*);
|
||||
_Thread *_threadwakeup(Rendez*);
|
||||
#define yield threadyield
|
||||
int threadid(void);
|
||||
|
||||
/*
|
||||
* I am tired of making this mistake.
|
||||
|
|
|
@ -370,6 +370,15 @@ threadsetstate(char *fmt, ...)
|
|||
va_end(arg);
|
||||
}
|
||||
|
||||
int
|
||||
threadid(void)
|
||||
{
|
||||
_Thread *t;
|
||||
|
||||
t = proc()->thread;
|
||||
return t->id;
|
||||
}
|
||||
|
||||
void
|
||||
needstack(int n)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue