mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +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*);
|
void _threadsleep(Rendez*);
|
||||||
_Thread *_threadwakeup(Rendez*);
|
_Thread *_threadwakeup(Rendez*);
|
||||||
#define yield threadyield
|
#define yield threadyield
|
||||||
|
int threadid(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I am tired of making this mistake.
|
* I am tired of making this mistake.
|
||||||
|
|
|
@ -370,6 +370,15 @@ threadsetstate(char *fmt, ...)
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
threadid(void)
|
||||||
|
{
|
||||||
|
_Thread *t;
|
||||||
|
|
||||||
|
t = proc()->thread;
|
||||||
|
return t->id;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
needstack(int n)
|
needstack(int n)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue