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:
authorChristopher Faylor <me@cgf.cx>2006-05-16 07:14:24 +0400
committerChristopher Faylor <me@cgf.cx>2006-05-16 07:14:24 +0400
commit562adf789066f0bbcd2999944a2648b42e8e8df9 (patch)
tree4f94240c4750774b1d4c0ac8dab6e5766e19859d /winsup/cygwin/gentls_offsets
parenta9e36321fda82e1f565f2291a2fc4eaf97de4fc6 (diff)
* sigproc.cc (no_signals_available): Detect hwait_sig == INVALID_HANDLE_VALUE.
(wait_sig): Set hwait_sig to INVALID_HANDLE_VALUE on __SIGEXIT. * cygtls.cc (_cygtls::init_thread): Zero entire _my_tls structure and no more. * cygtls.h (_my_tls::padding): Delete. (CYGTLS_PADSIZE): Redefine concept of padding to mean padding at the end of the stack. * dcrt0.cc (initialize_main_tls): Change return to void. * gentls_offsets: Treat const specially, too. Keep going after a '}' is found. Change negative offset calculation to use CYGTLS_PADSIZE. * init.cc (_my_oldfunc): New variable. (threadfunc_fe): Use stored tls value for oldfunc rather than blindly writing to the stack. (munge_threadfunc): Set oldfunc in tls. (dll_entry): Initialize tls allocation. * tlsoffsets.h: Regenerate.
Diffstat (limited to 'winsup/cygwin/gentls_offsets')
-rwxr-xr-xwinsup/cygwin/gentls_offsets11
1 files changed, 5 insertions, 6 deletions
diff --git a/winsup/cygwin/gentls_offsets b/winsup/cygwin/gentls_offsets
index 21c9d1e7a..0ab6b64ab 100755
--- a/winsup/cygwin/gentls_offsets
+++ b/winsup/cygwin/gentls_offsets
@@ -21,12 +21,11 @@ $pre =~ s/\n#ifndef _[^\n]+\n/\n/os;
$pre .= "\n//*/";
$tls =~ s%/\*\s*gentls_offsets.*?/\*\s*gentls_offsets\s*\*/%%ogs;
foreach ($tls =~ /^.*\n/mg) {
- $def .= $_ if $struct;
- last if /^};/o;
- /^\s*typedef/o and do {
+ /^}|\s*(?:typedef|const)/o and do {
$def .= $_ ;
next;
};
+ $def .= $_ if $struct;
if (!s/;.*$//o) {
if (!$struct && /^\s*(?:struct|class)\s*([a-z_0-9]+)/o) {
$def .= $_;
@@ -55,9 +54,9 @@ $def
int
main(int argc, char **argv)
{
- $struct foo[1];
-# define foo_end ((char *) (foo + 1))
-# define offset(f) (((char *) &(foo->f)) - foo_end)
+ $struct *foo;
+# define foo_beg ((char *) foo)
+# define offset(f) (-CYGTLS_PADSIZE + ((char *) &(foo->f)) - foo_beg)
# define poffset(f) (((char *) &(foo->f)) - ((char *) foo))
EOF
print TMP 'puts ("//;# autogenerated: Do not edit.\n");', "\n\n";