2014-09-07 20:18:06 +00:00
|
|
|
#include <pthread.h>
|
2006-07-14 13:51:24 +00:00
|
|
|
#include <tls.h>
|
|
|
|
|
|
|
|
RESULT offsetof (struct pthread, result)
|
|
|
|
TID offsetof (struct pthread, tid)
|
|
|
|
CANCELHANDLING offsetof (struct pthread, cancelhandling)
|
|
|
|
CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf)
|
|
|
|
MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
|
|
|
|
TLS_PRE_TCB_SIZE sizeof (struct pthread)
|
|
|
|
MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock)
|
|
|
|
|
|
|
|
-- Use a thread_offset when working with asm to make things simpler
|
|
|
|
-- This way we get the offset of a member in the struct pthread that
|
|
|
|
-- preceeds the thread pointer (which points to the dtv).
|
|
|
|
#define thread_offsetof(mem) (unsigned int)(offsetof(struct pthread, mem) - sizeof(struct pthread))
|
2006-09-16 00:46:19 +00:00
|
|
|
TID_THREAD_OFFSET thread_offsetof (tid)
|
2006-07-14 13:51:24 +00:00
|
|
|
MULTIPLE_THREADS_THREAD_OFFSET thread_offsetof (header.multiple_threads)
|