PERFORCE change 230005 for review
Jonathan Anderson
jonathan at FreeBSD.org
Thu Jun 20 16:54:29 UTC 2013
http://p4web.freebsd.org/@@230005?ac=10
Change 230005 by jonathan at jonathan-on-zenith on 2013/06/20 16:53:41
TESLA event handling sysctl.
Affected files ...
.. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/include/libtesla.h#9 edit
.. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_notification.c#12 edit
Differences ...
==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/include/libtesla.h#9 (text+ko) ====
@@ -276,6 +276,12 @@
/** Register a set of event handling vectors. */
int tesla_set_event_handlers(struct tesla_event_metahandler *);
+#ifdef _KERNEL
+#define TESLA_KERN_PRINTF_EV 0x1
+#define TESLA_KERN_DTRACE_EV 0x2
+#define TESLA_KERN_PANIC_EV 0x4
+#endif
+
/** @} */
#endif /* _TESLA_STATE */
==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_notification.c#12 (text+ko) ====
@@ -358,9 +358,8 @@
&printf_handlers,
#if defined(_KERNEL) && defined(KDTRACE_HOOKS)
&dtrace_handlers,
-#else
+#endif
&failstop_handlers,
-#endif
};
static struct tesla_event_metahandler default_event_handlers = {
@@ -373,4 +372,14 @@
.tem_handlers = default_handlers,
};
+#ifdef _KERNEL
+#include <sys/sysctl.h>
+
+SYSCTL_NODE(, OID_AUTO, tesla, CTLFLAG_RW, 0, "TESLA");
+SYSCTL_NODE(_tesla, OID_AUTO, events, CTLFLAG_RW, 0, "control of TESLA events");
+SYSCTL_UINT(_tesla_events, OID_AUTO, handlers, CTLFLAG_RW,
+ &default_event_handlers.tem_mask, 0,
+ "Mask of currently-enabled TESLA event handlers");
+#endif
+
static struct tesla_event_metahandler *event_handlers = &default_event_handlers;
More information about the p4-projects
mailing list