]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Slight reduce m_syswrap's dependence on m_signals by moving
authorNicholas Nethercote <njn@valgrind.org>
Tue, 21 Jun 2005 03:52:49 +0000 (03:52 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Tue, 21 Jun 2005 03:52:49 +0000 (03:52 +0000)
VG_(client_signal_OK)().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3982

coregrind/m_signals.c
coregrind/m_syswrap/priv_syswrap-generic.h
coregrind/m_syswrap/syswrap-generic.c
coregrind/m_syswrap/syswrap-linux.c
coregrind/pub_core_signals.h

index 7b71f75a65079b1b3d21276f14ec91dbb5d29568..3088edc7cfa7ebb74eb55306be50089ae44d5fba 100644 (file)
@@ -770,16 +770,6 @@ void VG_(clear_out_queued_signals)( ThreadId tid, vki_sigset_t* saved_mask )
    restore_all_host_signals(saved_mask);
 }
 
-Bool VG_(client_signal_OK)(Int sigNo)
-{
-   /* signal 0 is OK for kill */
-   Bool ret = sigNo >= 0 && sigNo <= VKI_SIGVGRTUSERMAX;
-
-   //VG_(printf)("client_signal_OK(%d) -> %d\n", sigNo, ret);
-
-   return ret;
-}
-
 /* ---------------------------------------------------------------------
    The signal simulation proper.  A simplified version of what the 
    Linux kernel does.
index b4c7da6ed9b91482e1535027df6c7d5e627a8430..e151c1b846971f7585c177db14d934b9ecc9c2c6 100644 (file)
@@ -40,6 +40,9 @@ extern
 Bool VG_(valid_client_addr)(Addr start, SizeT size, ThreadId tid,
                             const Char *syscallname);
 
+// 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);
index 7e0fbbe73dc2133c3e9194ed0bd562b30b57bc86..b8690024d7e54986d8f8ee963c6b56ce0b708e8b 100644 (file)
 #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"
 
 #include "priv_types_n_macros.h"
 #include "priv_syswrap-generic.h"
@@ -93,6 +93,16 @@ Bool VG_(valid_client_addr)(Addr start, SizeT size, ThreadId tid,
    return ret;
 }
 
+Bool VG_(client_signal_OK)(Int sigNo)
+{
+   /* signal 0 is OK for kill */
+   Bool ret = sigNo >= 0 && sigNo <= VKI_SIGVGRTUSERMAX;
+
+   //VG_(printf)("client_signal_OK(%d) -> %d\n", sigNo, ret);
+
+   return ret;
+}
+
 /* ---------------------------------------------------------------------
    Doing mmap, mremap
    ------------------------------------------------------------------ */
index 2a9422479d1942f0e74aa88ebe7db8081506108a..a50190c340da84bdb98139aa5597a39a8869e671 100644 (file)
@@ -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"
 
 #include "priv_types_n_macros.h"
index 99ccca415d123f154b5f8fed788e49f2784d62de..2b2fe550b4f8321360e595c637bcccd017cc0d32 100644 (file)
@@ -72,9 +72,6 @@ extern void VG_(synth_sigill)       (ThreadId tid, Addr addr);
 /* Extend the stack to cover addr, if possible */
 extern Bool VG_(extend_stack)(Addr addr, UInt maxsize);
 
-/* 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);