|
From: <sv...@va...> - 2005-05-18 19:47:48
|
Author: njn
Date: 2005-05-18 20:47:46 +0100 (Wed, 18 May 2005)
New Revision: 3769
Modified:
trunk/coregrind/core.h
trunk/coregrind/m_syscalls/syscalls.c
trunk/coregrind/vg_signals.c
Log:
Make VG_(sanitize_client_sigmask)() local to m_syscalls.
Modified: trunk/coregrind/core.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/core.h 2005-05-18 19:43:09 UTC (rev 3768)
+++ trunk/coregrind/core.h 2005-05-18 19:47:46 UTC (rev 3769)
@@ -408,9 +408,6 @@
before using that signal to kill the process. */
extern void VG_(set_default_handler)(Int sig);
=20
-/* Adjust a client's signal mask to match our internal requirements */
-extern void VG_(sanitize_client_sigmask)(ThreadId tid, vki_sigset_t *mas=
k);
-
/* Wait until a thread-related predicate is true */
extern void VG_(wait_for_threadstate)(Bool (*pred)(void *), void *arg);
=20
Modified: trunk/coregrind/m_syscalls/syscalls.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syscalls/syscalls.c 2005-05-18 19:43:09 UTC (rev 37=
68)
+++ trunk/coregrind/m_syscalls/syscalls.c 2005-05-18 19:47:46 UTC (rev 37=
69)
@@ -6043,7 +6043,26 @@
}
}
=20
+/* 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);
=20
+ 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 =3D=3D VG_(master_tid))
+ VG_(sigdelset)(mask, VKI_SIGVGCHLD);
+ else
+ VG_(sigaddset)(mask, VKI_SIGVGCHLD);
+}
+
void VG_(client_syscall) ( ThreadId tid )
{
ThreadState* tst;
@@ -6142,7 +6161,7 @@
PRINT(" --> ...\n");
=20
mask =3D tst->sig_mask;
- VG_(sanitize_client_sigmask)(tid, &mask);
+ sanitize_client_sigmask(tid, &mask);
=20
VG_(set_sleeping)(tid, VgTs_WaitSys);
VGA_(client_syscall)(syscallno, tst, &mask);
Modified: trunk/coregrind/vg_signals.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_signals.c 2005-05-18 19:43:09 UTC (rev 3768)
+++ trunk/coregrind/vg_signals.c 2005-05-18 19:47:46 UTC (rev 3769)
@@ -636,26 +636,6 @@
VG_(set_running)(VG_(master_tid));
}
=20
-/* 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 =3D=3D VG_(master_tid))
- VG_(sigdelset)(mask, VKI_SIGVGCHLD);
- else
- VG_(sigaddset)(mask, VKI_SIGVGCHLD);
-}
-
/*=20
This updates the thread's signal mask. There's no such thing as a
process-wide signal mask.
|