Date: Thu, 20 Jun 2013 16:54:28 GMT From: Jonathan Anderson <jonathan@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 230005 for review Message-ID: <201306201654.r5KGsS3Z009045@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@230005?ac=10 Change 230005 by jonathan@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306201654.r5KGsS3Z009045>