DrvISR
The Interrupt Service Thread (IST) is started from the RtndUpDown routine by attaching to the NIC interrupt. As such, the IST may make any calls valid within the context of a standard thread running within the context of the RTX64Nal process. Unlike a standard RTX64 thread however, the IST does not exit when the IST routine returns. The IST is scheduled to run when an interrupt from the NIC occurs. In turn the IST calls the user provided driver interrupt routine DrvISR. When the DrvISR routine returns, the IST waits again for the next interrupt from the NIC.
The RtndUpDown routine normally passes the local card information structure pointer as a parameter to the DrvISR routine, though this is driver dependent and up to the driver developer.
The DrvISR should respond to interrupts by acknowledging the NIC for the interrupts.
To respond to receive interrupts, the DrvISR should:
- Signal receive by calling RtnNotifyRecvQueue for a queue with receive notifications enabled.
- Discard all received packets for a queue with both receive notifications and polling disabled.
To respond to receive interrupts, the DrvISR should:
- If the driver does not support RtndTransmitEx it can service transmitted packets directly in DrvISR.
- If the driver supports RtndTransmitEx it must service transmitted packets in a transmit complete thread:
- If transmit complete notifications are enabled on a queue, the driver should call RtnNotifyTransmitQueue.
- If transmit complete notifications are disabled on a queue, the driver should signal its own transmit complete thread.
The driver might protect itself from hardware contention by entering a critical lock at the start of the DrvISR routine and exiting the lock when all hardware access has been completed.
Syntax
static void DrvISR( DRVDEV* pCardInfo );
Parameters
pCardInfo
Pointer to local card information structure for this instance of the driver.
Return Value
None
Process Context
DrvISR is always called from within the process context of the RTX64Nal process.
Requirements
Minimum Supported Version | RTX64 4.0 |
Header | rtapi.h |
Library | RTX64Nal.lib |
See Also