2003-03-17 11:22:52 +00:00
|
|
|
#include <sysdep.h>
|
|
|
|
#include <tls.h>
|
|
|
|
|
2003-04-25 22:28:13 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
-- Abuse tls.h macros to derive offsets relative to the thread register.
|
|
|
|
# undef __thread_register
|
|
|
|
# define __thread_register ((void *) 0)
|
2004-12-22 20:10:10 +00:00
|
|
|
# define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0)
|
2003-04-25 22:28:13 +00:00
|
|
|
|
|
|
|
#if TLS_MULTIPLE_THREADS_IN_TCB
|
|
|
|
MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
|
|
|
|
#endif
|
2004-03-10 23:14:28 +00:00
|
|
|
PID thread_offsetof (pid)
|
2004-12-15 07:04:50 +00:00
|
|
|
TID thread_offsetof (tid)
|