aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/thread.c
diff options
context:
space:
mode:
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)
{