summaryrefslogtreecommitdiffstats
path: root/sys/dev/dpt
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-08-21 06:24:40 +0000
committermsmith <msmith@FreeBSD.org>1999-08-21 06:24:40 +0000
commitb51f157bff8b959d943b0836a1c57f065b9318d5 (patch)
treee447ab34080a4d202ed41db3476df31ef1f56a50 /sys/dev/dpt
parenta753b272ec1066c690e1ba83c8780af55e3a6c78 (diff)
downloadFreeBSD-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/dpt')
-rw-r--r--sys/dev/dpt/dpt_scsi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/dpt/dpt_scsi.c b/sys/dev/dpt/dpt_scsi.c
index bb7362e..aae96a9 100644
--- a/sys/dev/dpt/dpt_scsi.c
+++ b/sys/dev/dpt/dpt_scsi.c
@@ -43,7 +43,7 @@
* arrays that span controllers (Wow!).
*/
-#ident "$Id: dpt_scsi.c,v 1.23 1999/05/06 20:16:22 ken Exp $"
+#ident "$Id: dpt_scsi.c,v 1.24 1999/08/16 01:49:35 gibbs Exp $"
#define _DPT_C_
@@ -155,7 +155,7 @@ static void dptprocesserror(dpt_softc_t *dpt, dpt_ccb_t *dccb,
u_int scsi_stat, u_int32_t resid);
static void dpttimeout(void *arg);
-static void dptshutdown(int howto, void *arg);
+static void dptshutdown(void *arg, int howto);
/* ================= Private Inline Function definitions ====================*/
static __inline int
@@ -1407,7 +1407,8 @@ dpt_attach(dpt_softc_t *dpt)
}
if (i > 0)
- at_shutdown(dptshutdown, dpt, SHUTDOWN_FINAL);
+ EVENTHANDLER_REGISTER(shutdown_final, dptshutdown,
+ dpt, SHUTDOWN_PRI_DEFAULT);
return (i);
}
@@ -1639,10 +1640,10 @@ dpttimeout(void *arg)
/*
* Shutdown the controller and ensure that the cache is completely flushed.
- * Called via at_shutdown(9) after all disk access has completed.
+ * Called from the shutdown_final event after all disk access has completed.
*/
static void
-dptshutdown(int howto, void *arg)
+dptshutdown(void *arg, int howto)
{
dpt_softc_t *dpt;
OpenPOWER on IntegriCloud