HAM_Unload

The HAM's last unload-time entry point that prepares the HAM for unloading and returns resources back to the system.

Thread Context:Blocking

Syntax

    LONG HAM_Unload (void);
    
    

Return Values

The following table lists return values and descriptions.

zero

Successful

Remarks

HAM_Unload is the HAM's entry point from the OS when it receives an UNLOAD command for this HAM. HAM_Unload is then responsible for releasing all appropriate resources and deregistering the HAM.

Upon entry into this function, the HAM needs to stay operational until all its pending I/O is flushed and NWPA stops any incoming I/O. To do this, the first call the HAM should make within HAM_Unload is to HAI_Deactivate_Bus. It is during the context of HAI_Deactivate_Bus that the NPA actually flushes pending I/O and stops new I/O for this HAM. Upon return from HAI_Deactivate_Bus, the HAM is guaranteed not to have any pending I/O.