diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-10-19 07:18:18 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-10-19 07:18:18 +0000 |
commit | 66def1a1b1d07d7fa44ff8002bd53fcc148ce577 (patch) | |
tree | 04883819c910918e589374003a186645eabc5541 /lib/librthread | |
parent | 7f888155ef1bbd82840f87236d158092eea99fec (diff) |
Remove some blatant lies. Provide a variant 1 archs with a default
value for THREAD_ERRNOPTR_OFFSET (can't be used from ASM or ld.so, but
it lets things compile as we fill things in)
Diffstat (limited to 'lib/librthread')
-rw-r--r-- | lib/librthread/tcb.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/librthread/tcb.h b/lib/librthread/tcb.h index a3485c8a973..89ae75696e1 100644 --- a/lib/librthread/tcb.h +++ b/lib/librthread/tcb.h @@ -30,7 +30,7 @@ * its first argument * * <machine/tcb.h> must define the TLS_VARIANT macro. If it defines - * that to 1, then it must also defined the macro + * that to 1, then may also defined the macro * THREAD_ERRNOPTR_OFFSET * Byte offset in struct pthread of the pointer to the * thread's errno @@ -64,7 +64,7 @@ void __set_tcb(void *); #if TLS_VARIANT == 1 /* - * Small TCB, with TLS data after the TCB. Used on IA64 and PowerPC + * Small TCB, with TLS data after the TCB. * Errno pointer stored in struct pthread */ @@ -73,6 +73,9 @@ struct thread_control_block { struct pthread *tcb_thread; }; +#ifndef THREAD_ERRNOPTR_OFFSET +# define THREAD_ERRNOPTR_OFFSET offsetof(struct pthread, errno_ptr) +#endif #define __ERRNOPTR(thread) \ (((int **)(thread))[THREAD_ERRNOPTR_OFFSET / sizeof(int *)]) #define TCB_ERRNOPTR() \ @@ -88,7 +91,6 @@ struct thread_control_block { #elif TLS_VARIANT == 2 /* * Large TCB, with TLS data before the TCB (i.e., negative offsets) - * Used everywhere but IA64 and PowerPC * Errno pointer stored in the TCB */ |