diff options
author | Christopher Faylor <me@cgf.cx> | 2008-02-15 20:53:11 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2008-02-15 20:53:11 +0300 |
commit | 70300fdb1c4f0834f83441fcd3fa029e110a7c2e (patch) | |
tree | 79601b6862fc095dc64f3093f732f2608acdfc9f /winsup/cygwin/exceptions.cc | |
parent | d0399780691190935aa55a4131f732c01f2ea7df (diff) |
Perform whitespace cleanup throughout.
* dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility.
(check_sanity_and_sync): Ditto.
* winsup.h (SIGTOMASK): Ditto. Just use constant in signal calculation.
* include/cygwin/version: Remove backwards signal mask compatibility define.
* path.cc (symlink_info::check_sysfile): Cosmetic change.
* registry.cc (get_registry_hive_path): Remove unneeded variable.
* exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use
either main sigmask or current thread sigmask.
(set_process_mask): Ditto.
(sighold): Ditto.
(sigrelse): Ditto.
(sigset): Ditto.
(set_process_mask_delta): Ditto.
(_cygtls::call_signal_handler): Ditto.
* fhandler_process.cc (format_process_status): Ditto.
* fhandler_termios.cc (fhandler_termios::bg_check): Ditto.
* pinfo.h (class pinfo): Ditto.
* select.cc (pselect): Ditto.
* signal.cc (sigprocmask): Ditto.
(abort): Ditto.
(sigpause): Ditto.
(sigsend): Ditto.
(wait_sig): Ditto.
* thread.h (pthread::parent_tls): New member.
* thread.cc (pthread::pthread): Record parent_tls here.
(pthread::thread_init_wrapper): Initialize sigmask from parent thread.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 73f6790dc..fc5d0cdcc 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -682,9 +682,9 @@ handle_sigsuspend (sigset_t tempmask) return -1; } - sigset_t oldmask = myself->getsigmask (); // Remember for restoration + sigset_t oldmask = _my_tls.sigmask; // Remember for restoration - set_signal_mask (tempmask, myself->getsigmask ()); + set_signal_mask (tempmask, _my_tls.sigmask); sigproc_printf ("oldmask %p, newmask %p", oldmask, tempmask); pthread_testcancel (); @@ -995,8 +995,7 @@ ctrl_c_handler (DWORD type) extern "C" void __stdcall set_process_mask (sigset_t newmask) { - set_signal_mask (newmask, myself->getsigmask ()); -sigproc_printf ("mask now %p\n", myself->getsigmask ()); + set_signal_mask (newmask, _my_tls.sigmask); } extern "C" int @@ -1010,9 +1009,9 @@ sighold (int sig) return -1; } mask_sync.acquire (INFINITE); - sigset_t mask = myself->getsigmask (); + sigset_t mask = _my_tls.sigmask; sigaddset (&mask, sig); - set_signal_mask (mask, myself->getsigmask ()); + set_signal_mask (mask, _my_tls.sigmask); mask_sync.release (); return 0; } @@ -1028,9 +1027,9 @@ sigrelse (int sig) return -1; } mask_sync.acquire (INFINITE); - sigset_t mask = myself->getsigmask (); + sigset_t mask = _my_tls.sigmask; sigdelset (&mask, sig); - set_signal_mask (mask, myself->getsigmask ()); + set_signal_mask (mask, _my_tls.sigmask); mask_sync.release (); return 0; } @@ -1050,7 +1049,7 @@ sigset (int sig, _sig_func_ptr func) } mask_sync.acquire (INFINITE); - sigset_t mask = myself->getsigmask (); + sigset_t mask = _my_tls.sigmask; /* If sig was in the signal mask return SIG_HOLD, otherwise return the previous disposition. */ if (sigismember (&mask, sig)) @@ -1068,7 +1067,7 @@ sigset (int sig, _sig_func_ptr func) signal (sig, func); sigdelset (&mask, sig); } - set_signal_mask (mask, myself->getsigmask ()); + set_signal_mask (mask, _my_tls.sigmask); mask_sync.release (); return prev; } @@ -1090,11 +1089,11 @@ set_process_mask_delta () if (_my_tls.deltamask & SIG_NONMASKABLE) oldmask = _my_tls.oldmask; /* from handle_sigsuspend */ else - oldmask = myself->getsigmask (); + oldmask = _my_tls.sigmask; newmask = (oldmask | _my_tls.deltamask) & ~SIG_NONMASKABLE; sigproc_printf ("oldmask %p, newmask %p, deltamask %p", oldmask, newmask, _my_tls.deltamask); - myself->setsigmask (newmask); + _my_tls.sigmask = newmask; mask_sync.release (); return oldmask; } @@ -1362,7 +1361,7 @@ _cygtls::call_signal_handler () sigact (thissig, &thissi, NULL); } incyg = 1; - set_signal_mask (this_oldmask, myself->getsigmask ()); + set_signal_mask (this_oldmask, _my_tls.sigmask); if (this_errno >= 0) set_errno (this_errno); } |