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 RtxTcpIp Stack process. Unlike a standard RTX 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 routine normally responds to receive interrupts by acknowledging the NIC for the interrupt and signaling the Receive thread.

Normally the driver protects 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. As such the driver should not call RtnTransmitDone within the DrvISR routine. Otherwise, it will cause a deadlock if the RtndTransmit routine uses the same critical lock (which it usually does).  RtnTransmitDone may cause a new call to RtndTransmit within the same context of the caller to RtnTransmitDone. It is unwise to do this from the DrvISR routine and should never be done from inside a critical lock.

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 run within the process context of the RTX64TcpIp Protocol Stack.