Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Mar 2003 15:19:29 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        arch@FreeBSD.org
Subject:   Convert process at_foo events to eventhandlers
Message-ID:  <XFMail.20030321151929.jhb@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
I'd like to convert the process at_fork, at_exec, and at_exit
events to be regular eventhandlers instead.  This way I get to
leverage the locking of the existing eventhandlers w/o having
to duplicate it in three other places.  The patch to do this is
at http://www.FreeBSD.org/~jhb/patches/proc_event.patch.
Note that the old API (at_foo, rm_at_foo) has been removed as
I can not easily implement the rm_at_foo functionality using
eventhandlers since eventhandlers allow for multiple instances
of a function in a list and use cookies instead of using the
function pointer directly to remove events.  There is precedent
for this in that at_shutdown() also died when at_shutdown() was
converted to an eventhandler.  This patch also defines some
generic eventhandler priorities so that users of eventhandlers
don't always have to define new constants for priorities.

Comments?

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030321151929.jhb>