Throughout, eliminate argument to sig_dispatch_pending.

* exceptions.cc (setup_handler): Move non-interruptible condition handling
(back) to wait_sig (as suggested by Pierre Humblet).
(set_process_mask): Don't worry about calling sig_dispatch_pending from
sigthread since it is detected in the function anyway.
(sig_handle): Eliminate thisproc arg.  Don't call sig_dispatch_pending on
SIGCONT since that should happen automatically.
* sigproc.cc (sig_dispatch_pending): Eliminate justwake argument.  Just return
when called from sigthread.
(wait_sig): Change some variables to bool.  Change inner while to an if.  Move
uninterruptible signal handling here.
(sigproc_terminate): Don't call sig_dispatch_pending.  Just increment semaphore
on exit.
* speclib: Use slightly different (but still flawed) method for determining
symbols to extract from libraries.
This commit is contained in:
Christopher Faylor
2003-08-19 04:10:42 +00:00
parent 755f575f15
commit 05cb7b17cb
9 changed files with 113 additions and 107 deletions

View File

@ -42,7 +42,7 @@ set_sigcatchers (void (*oldsig) (int), void (*cursig) (int))
extern "C" _sig_func_ptr
signal (int sig, _sig_func_ptr func)
{
sig_dispatch_pending (0);
sig_dispatch_pending ();
_sig_func_ptr prev;
/* check that sig is in right range */
@ -69,7 +69,7 @@ extern "C" int
nanosleep (const struct timespec *rqtp, struct timespec *rmtp)
{
int res = 0;
sig_dispatch_pending (0);
sig_dispatch_pending ();
sigframe thisframe (mainthread);
pthread_testcancel ();
@ -127,7 +127,7 @@ usleep (unsigned int useconds)
extern "C" int
sigprocmask (int sig, const sigset_t *set, sigset_t *oldset)
{
sig_dispatch_pending (0);
sig_dispatch_pending ();
/* check that sig is in right range */
if (sig < 0 || sig >= NSIG)
{
@ -167,7 +167,7 @@ sigprocmask (int sig, const sigset_t *set, sigset_t *oldset)
static int
kill_worker (pid_t pid, int sig)
{
sig_dispatch_pending (0);
sig_dispatch_pending ();
int res = 0;
pinfo dest (pid);
@ -287,7 +287,7 @@ killpg (pid_t pgrp, int sig)
extern "C" void
abort (void)
{
sig_dispatch_pending (0);
sig_dispatch_pending ();
sigframe thisframe (mainthread);
/* Flush all streams as per SUSv2.
From my reading of this document, this isn't strictly correct.
@ -313,7 +313,7 @@ abort (void)
extern "C" int
sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact)
{
sig_dispatch_pending (0);
sig_dispatch_pending ();
sigproc_printf ("signal %d, newact %p, oldact %p", sig, newact, oldact);
/* check that sig is in right range */
if (sig < 0 || sig >= NSIG)