|
From: <sv...@va...> - 2005-06-21 22:24:03
|
Author: njn
Date: 2005-06-21 23:23:59 +0100 (Tue, 21 Jun 2005)
New Revision: 3990
Log:
Move VKI_SIGVGKILL and VKI_SIGVGRTUSERMAX out of vki-linux.h since they'r=
e
not really from the kernel and they're defined in terms of VG_(max_signal=
),
which is in m_signals. Renamed them with the VG_ prefix too, since they'=
re
now not part of the kernel interface.
Modified:
trunk/coregrind/m_libcfile.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_signals.c
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/m_syswrap/syswrap-main.c
trunk/coregrind/pub_core_signals.h
trunk/include/vki-linux.h
Modified: trunk/coregrind/m_libcfile.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_libcfile.c 2005-06-21 13:26:17 UTC (rev 3989)
+++ trunk/coregrind/m_libcfile.c 2005-06-21 22:23:59 UTC (rev 3990)
@@ -32,7 +32,7 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcfile.h"
-#include "pub_core_libcprint.h"
+#include "pub_core_libcprint.h" // For VG_(sprintf)()
#include "pub_core_mallocfree.h"
#include "pub_core_syscall.h"
#include "vki_unistd.h"
Modified: trunk/coregrind/m_scheduler/scheduler.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_scheduler/scheduler.c 2005-06-21 13:26:17 UTC (rev =
3989)
+++ trunk/coregrind/m_scheduler/scheduler.c 2005-06-21 22:23:59 UTC (rev =
3990)
@@ -268,7 +268,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg, "kill_thread zaps tid %d lwp %d",
tid, VG_(threads)[tid].os_state.lwpid);
- VG_(tkill)(VG_(threads)[tid].os_state.lwpid, VKI_SIGVGKILL);
+ VG_(tkill)(VG_(threads)[tid].os_state.lwpid, VG_SIGVGKILL);
}
}
=20
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 13:26:17 UTC (rev 3989)
+++ trunk/coregrind/m_signals.c 2005-06-21 22:23:59 UTC (rev 3990)
@@ -333,7 +333,7 @@
default:
// VKI_SIGVG* are runtime variables, so we can't make them =
=20
// cases in the switch, so we handle them in the 'default' case=
.
- if (sig =3D=3D VKI_SIGVGKILL)
+ if (sig =3D=3D VG_SIGVGKILL)
skss_handler =3D sigvgkill_handler;
else {
if (scss_handler =3D=3D VKI_SIG_IGN)
@@ -577,7 +577,7 @@
if (signo < 1 || signo > VG_(max_signal)) goto bad_signo;
=20
/* don't let them use our signals */
- if ( (signo > VKI_SIGVGRTUSERMAX)
+ if ( (signo > VG_SIGVGRTUSERMAX)
&& new_act
&& !(new_act->ksa_handler =3D=3D VKI_SIG_DFL=20
|| new_act->ksa_handler =3D=3D VKI_SIG_IGN) )
@@ -1436,7 +1436,7 @@
VG_(message)(Vg_DebugMsg,"delivering signal %d (%s):%d to thread %=
d",=20
sigNo, signame(sigNo), info->si_code, tid );
=20
- if (sigNo =3D=3D VKI_SIGVGKILL) {
+ if (sigNo =3D=3D VG_SIGVGKILL) {
/* If this is a SIGVGKILL, we're expecting it to interrupt any
blocked syscall. It doesn't matter whether the VCPU state is
set to restart or not, because we don't expect it will
@@ -1963,7 +1963,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg, "sigvgkill for lwp %d tid %d", VG_(getti=
d)(), tid);
=20
- vg_assert(signo =3D=3D VKI_SIGVGKILL);
+ vg_assert(signo =3D=3D VG_SIGVGKILL);
vg_assert(si->si_signo =3D=3D signo);
vg_assert(VG_(threads)[tid].status =3D=3D VgTs_WaitSys);
=20
@@ -2114,9 +2114,9 @@
VG_(message)(Vg_DebugMsg, "Max kernel-supported signal is %d", VG_=
(max_signal));
=20
/* Our private internal signals are treated as ignored */
- scss.scss_per_sig[VKI_SIGVGKILL].scss_handler =3D VKI_SIG_IGN;
- scss.scss_per_sig[VKI_SIGVGKILL].scss_flags =3D VKI_SA_SIGINFO;
- VG_(sigfillset)(&scss.scss_per_sig[VKI_SIGVGKILL].scss_mask);
+ scss.scss_per_sig[VG_SIGVGKILL].scss_handler =3D VKI_SIG_IGN;
+ scss.scss_per_sig[VG_SIGVGKILL].scss_flags =3D VKI_SA_SIGINFO;
+ VG_(sigfillset)(&scss.scss_per_sig[VG_SIGVGKILL].scss_mask);
=20
/* Copy the process' signal mask into the root thread. */
vg_assert(VG_(threads)[1].status =3D=3D VgTs_Init);
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 13:26:17 UTC (=
rev 3989)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-06-21 22:23:59 UTC (=
rev 3990)
@@ -96,7 +96,7 @@
Bool VG_(client_signal_OK)(Int sigNo)
{
/* signal 0 is OK for kill */
- Bool ret =3D sigNo >=3D 0 && sigNo <=3D VKI_SIGVGRTUSERMAX;
+ Bool ret =3D sigNo >=3D 0 && sigNo <=3D VG_SIGVGRTUSERMAX;
=20
//VG_(printf)("client_signal_OK(%d) -> %d\n", sigNo, ret);
=20
Modified: trunk/coregrind/m_syswrap/syswrap-main.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-main.c 2005-06-21 13:26:17 UTC (rev=
3989)
+++ trunk/coregrind/m_syswrap/syswrap-main.c 2005-06-21 22:23:59 UTC (rev=
3990)
@@ -41,7 +41,7 @@
#include "pub_core_stacktrace.h" // For VG_(get_and_pp_StackTrace)()
#include "pub_core_tooliface.h"
#include "pub_core_options.h"
-#include "pub_core_signals.h" // For VG_(max_signal), VG_(poll_sig=
nals)
+#include "pub_core_signals.h" // For VG_SIGVGKILL, VG_(poll_signal=
s)
#include "pub_core_syscall.h"
#include "pub_core_syswrap.h"
=20
@@ -506,7 +506,7 @@
{
VG_(sigdelset)(mask, VKI_SIGKILL);
VG_(sigdelset)(mask, VKI_SIGSTOP);
- VG_(sigdelset)(mask, VKI_SIGVGKILL); /* never block */
+ VG_(sigdelset)(mask, VG_SIGVGKILL); /* never block */
}
=20
typedef
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 13:26:17 UTC (rev 3989)
+++ trunk/coregrind/pub_core_signals.h 2005-06-21 22:23:59 UTC (rev 3990)
@@ -40,6 +40,10 @@
/* Highest signal the kernel will let us use */
extern Int VG_(max_signal);
=20
+/* Use high signals because native pthreads wants to use low */
+#define VG_SIGVGKILL (VG_(max_signal)-0)
+#define VG_SIGVGRTUSERMAX (VG_(max_signal)-1)
+
extern void VG_(sigstartup_actions) ( void );
=20
/* Poll a thread's set of pending signals, and update the Thread's
Modified: trunk/include/vki-linux.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/include/vki-linux.h 2005-06-21 13:26:17 UTC (rev 3989)
+++ trunk/include/vki-linux.h 2005-06-21 22:23:59 UTC (rev 3990)
@@ -350,14 +350,6 @@
};
=20
//----------------------------------------------------------------------
-// From nowhere: constants internal to Valgrind
-//----------------------------------------------------------------------
-
-/* Use high signals because native pthreads wants to use low */
-#define VKI_SIGVGKILL (VG_(max_signal)-0) // [[internal: kill]]
-#define VKI_SIGVGRTUSERMAX (VG_(max_signal)-1) // [[internal: last user=
-usable RT signal]]
-
-//----------------------------------------------------------------------
// From linux-2.6.8.1/include/asm-generic/siginfo.h
//----------------------------------------------------------------------
=20
|