From 8dd8a81f71771d3f2d95a95992fdddebd3063919 Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 18 Mar 2005 18:56:17 +0000 Subject: add threaddata --- src/libthread/thread.c | 6 ++++++ src/libthread/threadimpl.h | 1 + 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/libthread/thread.c b/src/libthread/thread.c index 61d1aa2a..455d8da0 100644 --- a/src/libthread/thread.c +++ b/src/libthread/thread.c @@ -327,6 +327,12 @@ procdata(void) 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 d41b918b..346288de 100644 --- a/src/libthread/threadimpl.h +++ b/src/libthread/threadimpl.h @@ -70,6 +70,7 @@ struct _Thread Proc *proc; char name[256]; char state[256]; + void *udata; }; struct _Procrendez -- cgit v1.2.3