From b51f157bff8b959d943b0836a1c57f065b9318d5 Mon Sep 17 00:00:00 2001 From: msmith Date: Sat, 21 Aug 1999 06:24:40 +0000 Subject: 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 --- sys/dev/vx/if_vx_pci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/dev/vx') diff --git a/sys/dev/vx/if_vx_pci.c b/sys/dev/vx/if_vx_pci.c index 2bad3b0..386ba42 100644 --- a/sys/dev/vx/if_vx_pci.c +++ b/sys/dev/vx/if_vx_pci.c @@ -44,14 +44,14 @@ #include -static void vx_pci_shutdown(int, void *); +static void vx_pci_shutdown(void *, int); static const char *vx_pci_probe(pcici_t, pcidi_t); static void vx_pci_attach(pcici_t, int unit); static void vx_pci_shutdown( - int howto, - void *sc) + void *sc, + int howto) { vxstop(sc); vxfree(sc); @@ -122,7 +122,8 @@ vx_pci_attach( * doing do could allow DMA to corrupt kernel memory during the * reboot before the driver initializes. */ - at_shutdown(vx_pci_shutdown, sc, SHUTDOWN_POST_SYNC); + EVENTHANDLER_REGISTER(shutdown_post_sync, vx_pci_shutdown, sc, + SHUTDOWN_PRI_DEFAULT); pci_map_int(config_id, vxintr, (void *) sc, &net_imask); } -- cgit v1.1