diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9d00d22c9..62682f357 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2004-02-24 Christopher Faylor + + * gendef (stabilize_sig_stack): Correctly align this pointer for call + to _cygtls::call_signal_handler. + * gentls_offsets: Output sizeof field. + * tlsoffsets.h: Regenerate. + 2004-02-24 Christopher Faylor * dcrt0.cc (_dll_crt0): Don't check sync_startup if threadfunc_ix is set. diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef index d46dbb950..14c9f6702 100755 --- a/winsup/cygwin/gendef +++ b/winsup/cygwin/gendef @@ -249,8 +249,9 @@ stabilize_sig_stack: jmp 1b 2: cmpl \$0,$tls::sig(%edx) jz 3f - decl $tls::stacklock(%edx) - movl %edx,%eax + decl $tls::stacklock(%edx) # unlock + movl \$-$tls::sizeof__cygtls,%eax # point to beginning + addl %edx,%eax # of tls block call __ZN7_cygtls19call_signal_handlerEv jmp 1b 3: ret diff --git a/winsup/cygwin/gentls_offsets b/winsup/cygwin/gentls_offsets index c69488a36..144292751 100755 --- a/winsup/cygwin/gentls_offsets +++ b/winsup/cygwin/gentls_offsets @@ -53,6 +53,7 @@ main(int argc, char **argv) # define poffset(f) (((char *) &(foo->f)) - ((char *) foo)) EOF print TMP 'puts ("//;# autogenerated: Do not edit.\n");', "\n\n"; + print TMP "printf (\"//; \$tls::sizeof_$struct = %d;\\n\", sizeof($struct\));\n"; for my $f (@fields) { print TMP ' printf ("//; $tls::', $f, ' = %d;\n", ', "offset($f));\n"; print TMP ' printf ("//; $tls::p', $f, ' = %d;\n", ', "poffset($f));\n"; diff --git a/winsup/cygwin/tlsoffsets.h b/winsup/cygwin/tlsoffsets.h index af55081dc..2ff27339b 100644 --- a/winsup/cygwin/tlsoffsets.h +++ b/winsup/cygwin/tlsoffsets.h @@ -1,5 +1,6 @@ //;# autogenerated: Do not edit. +//; $tls::sizeof__cygtls = 3744; //; $tls::func = -3744; //; $tls::pfunc = 0; //; $tls::saved_errno = -3740;