extern void sigreturn ();
extern void sigdelayed ();
extern void siglast ();
-extern DWORD __sigfirst, __siglast;
};
extern DWORD sigtid;
interruptible (DWORD pc, int testvalid = 0)
{
int res;
- if ((pc >= (DWORD) &__sigfirst) && (pc <= (DWORD) &__siglast))
+ MEMORY_BASIC_INFORMATION m;
+
+ memset (&m, 0, sizeof m);
+ if (!VirtualQuery ((LPCVOID) pc, &m, sizeof m))
+ sigproc_printf ("couldn't get memory info, pc %p, %E", pc);
+
+ char *checkdir = (char *) alloca (windows_system_directory_length + 4);
+ memset (checkdir, 0, sizeof (checkdir));
+
+# define h ((HMODULE) m.AllocationBase)
+ /* Apparently Windows 95 can sometimes return bogus addresses from
+ GetThreadContext. These resolve to an allocation base == 0.
+ These should *never* be treated as interruptible. */
+ if (!h || m.State != MEM_COMMIT)
+ res = 0;
+ else if (testvalid)
+ res = 1; /* All we wanted to know was if this was a valid module. */
+ else if (h == user_data->hmodule)
+ res = 1;
+ else if (h == cygwin_hmodule)
+ res = 0;
+ else if (!GetModuleFileName (h, checkdir, windows_system_directory_length + 2))
res = 0;
else
- {
- MEMORY_BASIC_INFORMATION m;
- memset (&m, 0, sizeof m);
- if (!VirtualQuery ((LPCVOID) pc, &m, sizeof m))
- sigproc_printf ("couldn't get memory info, pc %p, %E", pc);
-
- char *checkdir = (char *) alloca (windows_system_directory_length + 4);
- memset (checkdir, 0, sizeof (checkdir));
-# define h ((HMODULE) m.AllocationBase)
- /* Apparently Windows 95 can sometimes return bogus addresses from
- GetThreadContext. These resolve to an allocation base == 0.
- These should *never* be treated as interruptible. */
- if (!h || m.State != MEM_COMMIT)
- res = 0;
- else if (testvalid)
- res = 1; /* All we wanted to know was if this was a valid module. */
- else if (h == user_data->hmodule)
- res = 1;
- else if (h == cygwin_hmodule)
- res = 0;
- else if (!GetModuleFileName (h, checkdir, windows_system_directory_length + 2))
- res = 0;
- else
- res = !strncasematch (windows_system_directory, checkdir,
- windows_system_directory_length);
- minimal_printf ("h %p", h);
-# undef h
- }
+ res = !strncasematch (windows_system_directory, checkdir,
+ windows_system_directory_length);
+ minimal_printf ("h %p", h);
+# undef h
minimal_printf ("interruptible %d", res);
return res;
if (hExeced)
TerminateProcess (hExeced, rc);
+ sigproc_printf ("about to call do_exit (%x)", rc);
do_exit (rc);
}
#define pid_offset (unsigned)(((_pinfo *)NULL)->pid)
extern "C" {
-static void __stdcall
-reset_signal_arrived () __attribute__ ((unused));
+static void __stdcall reset_signal_arrived () __attribute__ ((unused));
static void __stdcall
reset_signal_arrived ()
{
_sigreturn:
addl $4,%%esp
+ movl %%esp,%%ebp
+ addl $36,%%ebp
call _set_process_mask@4
popl %%eax # saved errno
testl %%eax,%%eax # Is it < 0
popl %%edx
popl %%edi
popl %%esi
+ popl %%ebp
popf
ret
_sigdelayed:
pushl %2 # original return address
pushf
+ pushl %%ebp
pushl %%esi
pushl %%edi
pushl %%edx
cmpl $0,_pending_signals
je 2f
-___sigfirst:
pushl $0
call _sig_dispatch_pending@4
-___siglast:
2: jmp *%5