Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Interrupt handling

Functions

int32_t ocs_hal_event_check (ocs_hal_t *hal, uint32_t vector)
 Check for events associated with the interrupt vector. More...
 
int32_t ocs_hal_process (ocs_hal_t *hal, uint32_t vector, uint32_t max_isr_time_msec)
 Process events associated with the interrupt vector. More...
 

Function Details

int32_t ocs_hal_event_check ( ocs_hal_t *  hal,
uint32_t  vector 
)

Check for events associated with the interrupt vector.

Parameters
halHardware context.
vectorZero-based interrupt vector number.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 2924 of file ocs_hal.c.

int32_t ocs_hal_process ( ocs_hal_t *  hal,
uint32_t  vector,
uint32_t  max_isr_time_msec 
)

Process events associated with the interrupt vector.

Description
Loop termination:

Without a mechanism to terminate the completion processing loop, it is possible under some workload conditions for the loop to never terminate (or at least take longer than the OS is happy to have an interrupt handler or kernel thread context hold a CPU without yielding).

The approach taken here is to periodically check how much time we've been in this processing loop, and if we exceed a predetermined time (multiple seconds), the loop is terminated, and ocs_hal_process() returns.
Parameters
halHardware context.
vectorZero-based interrupt vector number.
max_isr_time_msecMaximum time, in msec, to stay in this function
Returns
Returns 0 on success, or a non-zero on failure.

Definition at line 2971 of file ocs_hal.c.