]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make VG_(sanitize_client_sigmask)() local to m_syscalls.
authorNicholas Nethercote <njn@valgrind.org>
Wed, 18 May 2005 19:47:46 +0000 (19:47 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Wed, 18 May 2005 19:47:46 +0000 (19:47 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3769

coregrind/core.h
coregrind/m_syscalls/syscalls.c
coregrind/vg_signals.c

index b37ecf53a18a6a4a338ec1f3506494bb164dcac2..d5093430eee90e950e65a58e430740e360427a60 100644 (file)
@@ -408,9 +408,6 @@ extern Bool VG_(client_signal_OK)(Int sigNo);
    before using that signal to kill the process. */
 extern void VG_(set_default_handler)(Int sig);
 
-/* Adjust a client's signal mask to match our internal requirements */
-extern void VG_(sanitize_client_sigmask)(ThreadId tid, vki_sigset_t *mask);
-
 /* Wait until a thread-related predicate is true */
 extern void VG_(wait_for_threadstate)(Bool (*pred)(void *), void *arg);
 
index 06bf378edafc1a089e15f4a6d14b25682a51f975..5e1695dc6d12acfdbc98c41c6bdd67b463ce8bda 100644 (file)
@@ -6043,6 +6043,25 @@ void VG_(post_syscall) (ThreadId tid)
    }
 }
 
+/* Add and remove signals from mask so that we end up telling the
+   kernel the state we actually want rather than what the client
+   wants. */
+static void sanitize_client_sigmask(ThreadId tid, vki_sigset_t *mask)
+{
+   VG_(sigdelset)(mask, VKI_SIGKILL);
+   VG_(sigdelset)(mask, VKI_SIGSTOP);
+
+   VG_(sigdelset)(mask, VKI_SIGVGKILL); /* never block */
+
+   /* SIGVGCHLD is used by threads to indicate their state changes to
+      the master thread.  Mostly it doesn't care, so it leaves the
+      signal ignored and unblocked.  Everyone else should have it
+      blocked, so there's at most 1 thread with it unblocked. */
+   if (tid == VG_(master_tid))
+      VG_(sigdelset)(mask, VKI_SIGVGCHLD);
+   else
+      VG_(sigaddset)(mask, VKI_SIGVGCHLD);
+}
 
 void VG_(client_syscall) ( ThreadId tid )
 {
@@ -6142,7 +6161,7 @@ void VG_(client_syscall) ( ThreadId tid )
          PRINT(" --> ...\n");
 
          mask = tst->sig_mask;
-         VG_(sanitize_client_sigmask)(tid, &mask);
+         sanitize_client_sigmask(tid, &mask);
 
          VG_(set_sleeping)(tid, VgTs_WaitSys);
          VGA_(client_syscall)(syscallno, tst, &mask);
index 5e5f6408957c64de666b0628bba53c28399554d9..02daeba992b7de9d48967e9bdf1804c0d3efd9a3 100644 (file)
@@ -636,26 +636,6 @@ void VG_(wait_for_threadstate)(Bool (*pred)(void *), void *arg)
    VG_(set_running)(VG_(master_tid));
 }
 
-/* Add and remove signals from mask so that we end up telling the
-   kernel the state we actually want rather than what the client
-   wants. */
-void VG_(sanitize_client_sigmask)(ThreadId tid, vki_sigset_t *mask)
-{
-   VG_(sigdelset)(mask, VKI_SIGKILL);
-   VG_(sigdelset)(mask, VKI_SIGSTOP);
-
-   VG_(sigdelset)(mask, VKI_SIGVGKILL); /* never block */
-
-   /* SIGVGCHLD is used by threads to indicate their state changes to
-      the master thread.  Mostly it doesn't care, so it leaves the
-      signal ignored and unblocked.  Everyone else should have it
-      blocked, so there's at most 1 thread with it unblocked. */
-   if (tid == VG_(master_tid))
-      VG_(sigdelset)(mask, VKI_SIGVGCHLD);
-   else
-      VG_(sigaddset)(mask, VKI_SIGVGCHLD);
-}
-
 /* 
    This updates the thread's signal mask.  There's no such thing as a
    process-wide signal mask.