|
From: <sv...@va...> - 2005-06-21 03:52:52
|
Author: njn
Date: 2005-06-21 04:52:49 +0100 (Tue, 21 Jun 2005)
New Revision: 3982
Log:
Slight reduce m_syswrap's dependence on m_signals by moving=20
VG_(client_signal_OK)().
Modified:
trunk/coregrind/m_signals.c
trunk/coregrind/m_syswrap/priv_syswrap-generic.h
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/pub_core_signals.h
Modified: trunk/coregrind/m_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/m_signals.c 2005-06-21 03:36:01 UTC (rev 3981)
+++ trunk/coregrind/m_signals.c 2005-06-21 03:52:49 UTC (rev 3982)
@@ -770,16 +770,6 @@
restore_all_host_signals(saved_mask);
}
=20
-Bool VG_(client_signal_OK)(Int sigNo)
-{
- /* signal 0 is OK for kill */
- Bool ret =3D sigNo >=3D 0 && sigNo <=3D VKI_SIGVGRTUSERMAX;
-
- //VG_(printf)("client_signal_OK(%d) -> %d\n", sigNo, ret);
-
- return ret;
-}
-
/* ---------------------------------------------------------------------
The signal simulation proper. A simplified version of what the=20
Linux kernel does.
Modified: trunk/coregrind/m_syswrap/priv_syswrap-generic.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/m_syswrap/priv_syswrap-generic.h 2005-06-21 03:36:01 =
UTC (rev 3981)
+++ trunk/coregrind/m_syswrap/priv_syswrap-generic.h 2005-06-21 03:52:49 =
UTC (rev 3982)
@@ -40,6 +40,9 @@
Bool VG_(valid_client_addr)(Addr start, SizeT size, ThreadId tid,
const Char *syscallname);
=20
+// Returns True if the signal is OK for the client to use.
+extern Bool VG_(client_signal_OK)(Int sigNo);
+
// Return true if we're allowed to use or create this fd.
extern
Bool VG_(fd_allowed)(Int fd, const Char *syscallname, ThreadId tid, Bool=
soft);
Modified: trunk/coregrind/m_syswrap/syswrap-generic.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_syswrap/syswrap-generic.c 2005-06-21 03:36:01 UTC (=
rev 3981)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-06-21 03:52:49 UTC (=
rev 3982)
@@ -42,13 +42,13 @@
#include "pub_core_libcsignal.h"
#include "pub_core_main.h"
#include "pub_core_mallocfree.h"
-#include "pub_core_stacktrace.h" // For VG_(get_and_pp_StackTrace)()
-#include "pub_core_tooliface.h"
#include "pub_core_options.h"
#include "pub_core_scheduler.h"
#include "pub_core_signals.h"
+#include "pub_core_stacktrace.h" // For VG_(get_and_pp_StackTrace)()
#include "pub_core_syscall.h"
#include "pub_core_syswrap.h"
+#include "pub_core_tooliface.h"
=20
#include "priv_types_n_macros.h"
#include "priv_syswrap-generic.h"
@@ -93,6 +93,16 @@
return ret;
}
=20
+Bool VG_(client_signal_OK)(Int sigNo)
+{
+ /* signal 0 is OK for kill */
+ Bool ret =3D sigNo >=3D 0 && sigNo <=3D VKI_SIGVGRTUSERMAX;
+
+ //VG_(printf)("client_signal_OK(%d) -> %d\n", sigNo, ret);
+
+ return ret;
+}
+
/* ---------------------------------------------------------------------
Doing mmap, mremap
------------------------------------------------------------------ */
Modified: trunk/coregrind/m_syswrap/syswrap-linux.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_syswrap/syswrap-linux.c 2005-06-21 03:36:01 UTC (re=
v 3981)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2005-06-21 03:52:49 UTC (re=
v 3982)
@@ -42,7 +42,6 @@
#include "pub_core_tooliface.h"
#include "pub_core_options.h"
#include "pub_core_scheduler.h"
-#include "pub_core_signals.h" // For VG_(client_signal_OK)()
#include "pub_core_syscall.h"
=20
#include "priv_types_n_macros.h"
Modified: trunk/coregrind/pub_core_signals.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/pub_core_signals.h 2005-06-21 03:36:01 UTC (rev 3981)
+++ trunk/coregrind/pub_core_signals.h 2005-06-21 03:52:49 UTC (rev 3982)
@@ -72,9 +72,6 @@
/* Extend the stack to cover addr, if possible */
extern Bool VG_(extend_stack)(Addr addr, UInt maxsize);
=20
-/* Returns True if the signal is OK for the client to use */
-extern Bool VG_(client_signal_OK)(Int sigNo);
-
/* Forces the client's signal handler to SIG_DFL - generally just
before using that signal to kill the process. */
extern void VG_(set_default_handler)(Int sig);
|