Date: Sun, 08 Oct 2017 11:56:30 -0600 From: Ian Lepore <ian@freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r324415 - in head/sys: kern sys Message-ID: <1507485390.86205.323.camel@freebsd.org> In-Reply-To: <201710081733.v98HXnu1094645@repo.freebsd.org> References: <201710081733.v98HXnu1094645@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2017-10-08 at 17:33 +0000, Ian Lepore wrote: > Author: ian > Date: Sun Oct 8 17:33:49 2017 > New Revision: 324415 > URL: https://svnweb.freebsd.org/changeset/base/324415 > > Log: > Add eventhandler notifications for newbus device attach/detach. > > [...] > > A couple salient comments from the review, they amount to some helpful > documentation about these events, but there's currently no good place for > such documentation... About this last point... sys/eventhandler.h is now an ever-growing list of EVENTHANDLER_DECLARE() statements for events that are unrelated to each other. I think we are at the point where it's no longer a few well-known "standard system event queues", it's turning into a mess. My first thought was to add these to bus.h because they're bus events. But you have to include eventhandler.h to use EVENTHANDLER_DECLARE, and I didn't want to pull it (and its dependencies) into bus.h. Now I'm thinking maybe we need a handful of separate header files, like bus_events.h, proc_events.h, thread_events.h, etc. Maybe we could have a kern_events.h as a catch-all for a few misc ones like low-memory, root-mounted, etc. Having a few subsystem-focused header files would provide a good place to put some comment blocks describing quirks and other nice-to-know information about using/handling the events. Or we could go with full-on manpages for describing each event, or each group of related events. In that case we'd need some sort of naming convention that makes it easy to find the page for the events you care about. My gut tells me comment blocks at the point of the DECLARE statements are more likely to get written than manpages. Thoughts? -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1507485390.86205.323.camel>