add threaddata
diff --git a/src/libthread/thread.c b/src/libthread/thread.c
index 61d1aa2..455d8da 100644
--- a/src/libthread/thread.c
+++ b/src/libthread/thread.c
@@ -327,6 +327,12 @@
 	return &proc()->udata;
 }
 
+void**
+threaddata(void)
+{
+	return &proc()->thread->udata;
+}
+
 extern Jmp *(*_notejmpbuf)(void);
 static Jmp*
 threadnotejmp(void)
diff --git a/src/libthread/threadimpl.h b/src/libthread/threadimpl.h
index d41b918..346288d 100644
--- a/src/libthread/threadimpl.h
+++ b/src/libthread/threadimpl.h
@@ -70,6 +70,7 @@
 	Proc	*proc;
 	char	name[256];
 	char	state[256];
+	void *udata;
 };
 
 struct _Procrendez