From: Nicholas Nethercote Date: Wed, 4 Aug 2004 15:26:38 +0000 (+0000) Subject: Remove sigshutdown_actions(), a hangover from the --stop-after days. X-Git-Tag: svn/VALGRIND_2_2_0~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35c5699f60a218f8f8e6fc1146607d8499367303;p=thirdparty%2Fvalgrind.git Remove sigshutdown_actions(), a hangover from the --stop-after days. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2569 --- diff --git a/coregrind/vg_include.h b/coregrind/vg_include.h index 4938458ce6..36ca410039 100644 --- a/coregrind/vg_include.h +++ b/coregrind/vg_include.h @@ -985,7 +985,6 @@ extern Int VG_(sig_rtmax); extern Int VG_(sig_alloc_rtsig) ( Int high ); extern void VG_(sigstartup_actions) ( void ); -extern void VG_(sigshutdown_actions) ( void ); extern void VG_(deliver_signal) ( ThreadId tid, const vki_ksiginfo_t *, Bool async ); extern void VG_(unblock_host_signal) ( Int sigNo ); diff --git a/coregrind/vg_signals.c b/coregrind/vg_signals.c index 5731a10cff..974377339a 100644 --- a/coregrind/vg_signals.c +++ b/coregrind/vg_signals.c @@ -2381,52 +2381,6 @@ void VG_(sigstartup_actions) ( void ) } - -/* Copy the process' sim signal state to the real state, - for when we transfer from the simulated to real CPU. - PROBLEM: what if we're running a signal handler when we - get here? Hmm. - I guess we wind up in vg_signalreturn_bogusRA, *or* the - handler has done/will do a longjmp, in which case we're ok. -*/ -void VG_(sigshutdown_actions) ( void ) -{ - Int i, ret; - - vki_ksigset_t saved_procmask; - vki_ksigaction sa; - - VG_(block_all_host_signals)( &saved_procmask ); - - /* Copy per-signal settings from SCSS. */ - for (i = 1; i <= VKI_KNSIG; i++) { - - sa.ksa_handler = vg_scss.scss_per_sig[i].scss_handler; - sa.ksa_flags = vg_scss.scss_per_sig[i].scss_flags; - sa.ksa_mask = vg_scss.scss_per_sig[i].scss_mask; - sa.ksa_restorer = vg_scss.scss_per_sig[i].scss_restorer; - - if (VG_(clo_trace_signals)) - VG_(printf)("restoring handler 0x%x for signal %d\n", - (Addr)(sa.ksa_handler), i ); - - /* Set the old host action */ - ret = VG_(ksigaction)(i, &sa, NULL); - if (i != VKI_SIGKILL && i != VKI_SIGSTOP) - vg_assert(ret == 0); - } - - /* Restore the sig alt stack. */ - ret = VG_(ksigaltstack)(&VG_(threads)[1].altstack, NULL); - vg_assert(ret == 0); - - /* A bit of a kludge -- set the sigmask to that of the root - thread. */ - vg_assert(VG_(threads)[1].status != VgTs_Empty); - VG_(restore_all_host_signals)( &VG_(threads)[1].sig_mask ); -} - - /*--------------------------------------------------------------------*/ /*--- end vg_signals.c ---*/ /*--------------------------------------------------------------------*/