diff options
Diffstat (limited to 'src/libthread')
-rw-r--r-- | src/libthread/thread.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libthread/thread.c b/src/libthread/thread.c index 145a5033..ca4d35af 100644 --- a/src/libthread/thread.c +++ b/src/libthread/thread.c @@ -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) { |