HAM_Abort_HACB
Aborts HACB requests received by a HAM.
LONG HAM_Abort_HACB ( LONG hamBusHandle, struct HACBStruct *HACB, LONG flag );
The following table indicates the proper return value associated with each input flag value:
HAM_Abort_HACB is the HAM's entry point for aborting I/O requests, and it is a non-blocking function. This function is registered with NWPA during NPA_Register_HAM_Module.
NWPA passes three arguments to HAM_Abort_HACB. The first two arguments are exactly the same as those passed to HAM_Execute_HACB. The third argument is the flags parameter, and its value indicates the conditions that determine the abort type.
When an unconditional abort is indicated, HAM_Abort_HACB is required to cancel the indicated HACB request no matter what. If the HACB is currently in the device queue, the abort merely entails unlinking the HACB from the queue, placing the abort code (0x0004) in its hacbCompletion field, calling HAI_Complete_HACB, and returning a zero. This abort case is referred to as a clean abort. If the HACB has already been sent to the device, then the value in flags must be visible to HAM_ISR so that it can abort the HACB request even after it was processed by the device.
NWPA guarantees that aborts are done during a single thread with interrupts disabled; therefore, no new requests are pulled from the device queue and issued to the device during an abort sequence. This ensures that a calling process can issue a clean abort check, and if the abort can be done cleanly, issue the abort without entering a critical-race window where the request gets sent to the device somewhere between the check request and the abort request.