diff options
author | msmith <msmith@FreeBSD.org> | 1999-08-21 06:24:40 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1999-08-21 06:24:40 +0000 |
commit | b51f157bff8b959d943b0836a1c57f065b9318d5 (patch) | |
tree | e447ab34080a4d202ed41db3476df31ef1f56a50 /sys/dev/aic7xxx | |
parent | a753b272ec1066c690e1ba83c8780af55e3a6c78 (diff) | |
download | FreeBSD-src-b51f157bff8b959d943b0836a1c57f065b9318d5.zip FreeBSD-src-b51f157bff8b959d943b0836a1c57f065b9318d5.tar.gz |
Implement a new generic mechanism for attaching handler functions to
events, in order to pave the way for removing a number of the ad-hoc
implementations currently in use.
Retire the at_shutdown family of functions and replace them with
new event handler lists.
Rework kern_shutdown.c to take greater advantage of the use of event
handlers.
Reviewed by: green
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 7acab86..1d0d043 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -36,7 +36,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.c,v 1.31 1999/05/23 18:55:58 gibbs Exp $ + * $Id: aic7xxx.c,v 1.32 1999/08/16 22:49:28 gibbs Exp $ */ /* * A few notes on features of the driver. @@ -96,6 +96,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/malloc.h> +#include <sys/eventhandler.h> #include <sys/buf.h> #include <sys/proc.h> @@ -209,7 +210,7 @@ static bus_dmamap_callback_t ahcdmamapcb; #if UNUSED static void ahc_dump_targcmd(struct target_cmd *cmd); #endif -static void ahc_shutdown(int howto, void *arg); +static void ahc_shutdown(void *arg, int howto); static cam_status ahc_find_tmode_devs(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb, @@ -4291,7 +4292,7 @@ ahc_init(struct ahc_softc *ahc) ahc_loadseq(ahc); /* We have to wait until after any system dumps... */ - at_shutdown(ahc_shutdown, ahc, SHUTDOWN_FINAL); + EVENTHANDLER_REGISTER(shutdown_final, ahc_shutdown, ahc, SHUTDOWN_PRI_DEFAULT); return (0); } @@ -6436,7 +6437,7 @@ ahc_dump_targcmd(struct target_cmd *cmd) #endif static void -ahc_shutdown(int howto, void *arg) +ahc_shutdown(void *arg, int howto) { struct ahc_softc *ahc; int i; |