* cygtls.h (CYGTLS_INITIALIZED): Change to a little more unlikely value.
(CYGTLSMAGIC): Delete. * dcrt0.cc (dll_crt0_0): Call sigproc_init during init startup. (_dll_crt0): Don't worry about sync_startup. Just wait for sigthread here. * dll_init.cc (cygwin_detach_dll): Only pick up tls version of retaddr if we have a valid tls. * fork.cc (frok::child): Remove sigproc_init initialization since it happens much earlier now. * gendef: Recognize SIGFE_MAYBE. (fefunc): Generate calls to _sigfe_maybe, if appropriate. (_sigfe_maybe): New function. * init.cc (search_for): Always initialize search_for, even on fork. (calibration_thread): Delete. (calibration_id): Delete. (prime_threads): Delete. (munge_threadfunc): Remove calibration_thread special case. Avoid calling thread function if we haven't yet hit the "search_for" thread. (dll_entry): Remove prime_threads call. Only call munge_threadfunc when hwait_sig is active. Ditto. for _my_tls.remove (); * sigproc.cc (hwait_sig): Make global. (sigproc_init): Don't bother with sync_startup. (sig_send): Treat flush as a no-op when signals are held. (wait_sig): Cause signals to be held after fork.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# Copyright 2003, 2004, 2005 Red Hat, Inc.
|
||||
# Copyright 2003, 2004, 2005, 2006 Red Hat, Inc.
|
||||
#
|
||||
# This file is part of Cygwin.
|
||||
#
|
||||
@@ -43,12 +43,14 @@ for (@in) {
|
||||
chomp;
|
||||
if (/=/o) {
|
||||
if (s/\s+NOSIGFE\s*$//) {
|
||||
} elsif (s/ SIGFE$//) {
|
||||
my $func = (split(' '))[2];
|
||||
$sigfe{$func} = '_sigfe_' . $func;
|
||||
# nothing
|
||||
} elsif (s/ SIGFE(_MAYBE)?$//) {
|
||||
my $func = (split(' '))[2];
|
||||
my $maybe = lc $1 . '_';
|
||||
$sigfe{$func} = '_sigfe' . $maybe . $func;
|
||||
}
|
||||
} else {
|
||||
my ($func, $sigfe) = m%^\s*(\S+)(?:\s+((?:NO)?SIGR?FE))?$%o;
|
||||
my ($func, $sigfe) = m%^\s*(\S+)(?:\s+((?:NO)?SIGFE(?:_MAYBE)?))?$%o;
|
||||
if (defined($sigfe) && $sigfe =~ /^NO/o) {
|
||||
$_ = $func;
|
||||
} else {
|
||||
@@ -83,13 +85,14 @@ close SIGFE;
|
||||
sub fefunc {
|
||||
my $func = '_' . shift;
|
||||
my $fe = '_' . shift;
|
||||
my $sigfe_func = ($fe =~ /^(.*)$func/)[0];
|
||||
my $extra;
|
||||
my $res = <<EOF;
|
||||
.extern $func
|
||||
.global $fe
|
||||
$fe:
|
||||
pushl \$$func
|
||||
jmp __sigfe
|
||||
jmp $sigfe_func
|
||||
|
||||
EOF
|
||||
if (!$main::first++) {
|
||||
@@ -97,6 +100,18 @@ EOF
|
||||
.text
|
||||
|
||||
.stabs "_sigfe:F(0,1)",36,0,0,__sigfe
|
||||
__sigfe_maybe:
|
||||
pushl %ebx
|
||||
pushl %edx
|
||||
movl %fs:4,%ebx # location of bottom of stack
|
||||
movl $tls::initialized(%ebx),%eax
|
||||
cmpl \$0xc763173f,%eax # initialized?
|
||||
je 1f
|
||||
popl %edx
|
||||
popl %ebx
|
||||
popl %eax
|
||||
jmp *%eax
|
||||
|
||||
__sigfe:
|
||||
pushl %ebx
|
||||
pushl %edx
|
||||
|
Reference in New Issue
Block a user