Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-01-27 14:39:57 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-05-13 14:58:39 +0300
commitd4fa3b4abbf70a586034771267be8e4c1690a023 (patch)
tree6c32b49a22b6ebf936cb7b4e0d970f413bc84d19 /winsup/cygwin/miscfuncs.cc
parent2aa37fed76ea644bfb4bcc348aceec9f19777195 (diff)
Cygwin: config.h: stop including auto-generated tlsoffsets.h file
This was a hack to begin with. Clean this mess up: - Move definition of CYGTLS_PADSIZE to cygwin/config.h and drop local cygtls_padsize.h - Rename CYGTLS_PADSIZE to __CYGTLS_PADSIZE__ to keep namespace clean. Redefine as macro, rather than as const. - Move struct _reent first in struct _cygtls to allow using __CYGTLS_PADSIZE__ as offset in __getreent(). Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/miscfuncs.cc')
-rw-r--r--winsup/cygwin/miscfuncs.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index 4a5db6f2e..739d9de3b 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
@@ -415,7 +415,7 @@ pthread_wrapper (PVOID arg)
SetThreadStackGuarantee (&wrapper_arg.guardsize);
}
/* Initialize new _cygtls. */
- _my_tls.init_thread (wrapper_arg.stackbase - CYGTLS_PADSIZE,
+ _my_tls.init_thread (wrapper_arg.stackbase - __CYGTLS_PADSIZE__,
(DWORD (*)(void*, void*)) wrapper_arg.func);
#ifdef __i386__
/* Copy exception list over to new stack. I'm not quite sure how the
@@ -458,7 +458,7 @@ pthread_wrapper (PVOID arg)
movq 8(%%rbx), %%r13 # Load thread arg into r13 \n\
movq 16(%%rbx), %%rcx # Load stackaddr into rcx \n\
movq 24(%%rbx), %%rsp # Load stackbase into rsp \n\
- subq %[CYGTLS], %%rsp # Subtract CYGTLS_PADSIZE \n\
+ subq %[CYGTLS], %%rsp # Subtract __CYGTLS_PADSIZE__ \n\
# (here we are 16 bytes aligned)\n\
subq $32, %%rsp # Subtract another 32 bytes \n\
# (shadow space for arg regs) \n\
@@ -474,7 +474,7 @@ pthread_wrapper (PVOID arg)
movq %%r13, %%rcx # Move thread arg to 1st arg reg\n\
call *%%r12 # Call thread func \n"
: : [WRAPPER_ARG] "o" (wrapper_arg),
- [CYGTLS] "i" (CYGTLS_PADSIZE));
+ [CYGTLS] "i" (__CYGTLS_PADSIZE__));
#else
__asm__ ("\n\
leal %[WRAPPER_ARG], %%ebx # Load &wrapper_arg into ebx \n\
@@ -482,7 +482,7 @@ pthread_wrapper (PVOID arg)
movl 4(%%ebx), %%ecx # Load thread arg into ecx \n\
movl 8(%%ebx), %%edx # Load stackaddr into edx \n\
movl 12(%%ebx), %%ebx # Load stackbase into ebx \n\
- subl %[CYGTLS], %%ebx # Subtract CYGTLS_PADSIZE \n\
+ subl %[CYGTLS], %%ebx # Subtract __CYGTLS_PADSIZE__ \n\
subl $4, %%ebx # Subtract another 4 bytes \n\
movl %%ebx, %%esp # Set esp \n\
xorl %%ebp, %%ebp # Set ebp to 0 \n\
@@ -505,7 +505,7 @@ pthread_wrapper (PVOID arg)
popl %%eax # Pop thread_func address \n\
call *%%eax # Call thread func \n"
: : [WRAPPER_ARG] "o" (wrapper_arg),
- [CYGTLS] "i" (CYGTLS_PADSIZE));
+ [CYGTLS] "i" (__CYGTLS_PADSIZE__));
#endif
/* pthread::thread_init_wrapper calls pthread::exit, which
in turn calls ExitThread, so we should never arrive here. */