diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 21:28:35 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 21:28:35 +0000 |
commit | 4dce66dd06525e04df26b134d6cc78c1902ed5ab (patch) | |
tree | eb135e5d32862983c98b472689953daa9b2aa989 | |
parent | 892b050abe43f4e668c8176c85a2b468ba71422e (diff) |
fix merge
-rw-r--r-- | hurd/hurd/threadvar.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h index c61e3bb9d9..414e452db5 100644 --- a/hurd/hurd/threadvar.h +++ b/hurd/hurd/threadvar.h @@ -22,6 +22,21 @@ #include <features.h> #include <tls.h> +/* The per-thread variables are found by ANDing this mask + with the value of the stack pointer and then adding this offset. + + In the multi-threaded case, cthreads initialization sets + __hurd_threadvar_stack_mask to ~(cthread_stack_size - 1), a mask which + finds the base of the fixed-size cthreads stack; and + __hurd_threadvar_stack_offset to a small offset that skips the data + cthreads itself maintains at the base of each thread's stack. + + In the single-threaded or libpthread case, __hurd_threadvar_stack_mask is + zero, so the stack pointer is ignored. */ + +extern unsigned long int __hurd_threadvar_stack_mask; +extern unsigned long int __hurd_threadvar_stack_offset; + /* The variables __hurd_sigthread_stack_base and __hurd_sigthread_stack_end define the bounds of the stack used by the signal thread, so that thread can always be specifically identified. */ |