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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to