Index Index for
Section 9
Index Alphabetical
listing for D
Bottom of page Bottom of
page

drvr_register_flush(9r)

NAME

drvr_register_flush - General: Registers or deregisters a flush interface

SYNOPSIS

void drvr_register_flush( void (*callback)(), caddr_t parameter, int flags );

ARGUMENTS

callback Specifies the name of the device driver interface to be registered or deregistered by drvr_register_flush. When registered, this is the flush interface that the kernel calls just prior to system shutdown. parameter Specifies a parameter that the device driver needs the kernel to pass to the registered driver flush interface. For example, you could pass a pointer to a device structure and the kernel passes this to the driver's registered flush interface. flags Specifies whether to register or deregister the device driver's flush interface. You can pass one of the following constants: DRVR_REGISTER Registers a device driver's flush interface. DRVR_UNREGISTER Deregisters a device driver's flush interface.

DESCRIPTION

The drvr_register_flush interface registers or deregisters a flush interface to be called when the system performs a system shutdown. The kernel calls this interface just prior to system shutdown. The drvr_register_flush interface allows device drivers to ensure that all I/O to a bus adapter has been completed. Some bus adapters are asynchronous to the system bus (containing buffers) and need to be cleared out (that is, flushed).

NOTES

Device drivers should call the drvr_register_flush interface if it is necessary to call a flush interface before the kernel performs a dump operation. Device drivers should call the drvr_register_shutdown interface if it is necessary to call a shutdown interface that the kernel calls after it performs the dump operation.

CAUTIONS

The drvr_register_flush interface causes a system crash and displays an appropriate message on the console terminal if you specify an invalid bit in the flags argument. The flush interface that you register should never acquire a simple or complex lock. The reason for this is that on a panic, the kernel's call to the flush interface can cause the CPU to double panic, hang, or both if the callback interface tries to access locks that were taken through active code paths at the time of the panic. This double panic or hang of the CPU would result in no crash dump for diagnosis. A hang of the CPU can require operator intervention to restart the CPU.

RETURN VALUES

None

SEE ALSO

Kernel Interfaces: drvr_register_shutdown(9r)

Index Index for
Section 9
Index Alphabetical
listing for D
Top of page Top of
page