aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/thread.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-02-05 17:50:09 +0000
committerrsc <devnull@localhost>2006-02-05 17:50:09 +0000
commit9eda38e51f278aeceefd73bea6835eb929c00328 (patch)
treecfe8ee96cc6702e9f438be2456e0cfba74bd1d75 /src/libthread/thread.c
parent1b404fe6e4a50425853434086895517fbe2da4b3 (diff)
downloadplan9port-9eda38e51f278aeceefd73bea6835eb929c00328.tar.gz
plan9port-9eda38e51f278aeceefd73bea6835eb929c00328.tar.bz2
plan9port-9eda38e51f278aeceefd73bea6835eb929c00328.zip
add threadid
Diffstat (limited to 'src/libthread/thread.c')
-rw-r--r--src/libthread/thread.c9
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)
{