Rtnl2CreatePhysicalTxQueueEvent
Rtnl2CreatePhysicalTxQueueEvent enables the hardware interrupt for a given Physical Transmit Queue and creates an event for the specified Physical Transmit Queue. This event is signaled by the NL2 each time the NIC triggers the hardware interrupt associated with that Physical Transmit Queue.
Syntax
BOOL Rtnl2CreatePhysicalTxQueueEvent(
[in] RTNL2_HPHYSICAL_TX_QUEUE PhysicalTxQueue,
[out] HANDLE *pEvent
);
Parameters
[in] PhysicalTxQueue
A handle to the Physical Transmit Queue obtained from Rtnl2AcquirePhysicalTxQueue.
[out] pEvent
A handle to the created event.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.
Possible error codes:
| Error code | Meaning |
|---|---|
|
ERROR_ALREADY_EXISTS |
The calling process has already created a Transmit event for this Physical Transmit Queue. |
|
ERROR_INVALID_PARAMETER |
The supplied Physical Transmit Queue handle is invalid. |
|
ERROR_NOT_READY |
The calling process has not called Rtnl2Init. |
|
RTNL2_ERROR_NO_MORE_COMMUNICATION |
Unable to communicate with the NL2 process. This might be because the NL2 process is not running anymore, or because an application process thread was terminated during a previous call to an NL2 API function. |
|
RTNL2_ERROR_PHYSICAL_TX_QUEUE_IS_RELEASING |
Another thread of the calling process is executing Rtnl2ReleasePhysicalTxQueue at the same time. |
|
RTNL2_ERROR_PHYSICAL_TX_QUEUE_NOT_READY |
The Physical Transmit Queue is not ready. |
|
RTNL2_ERROR_SERIALIZED_COMMAND_TIMEOUT |
The NL2 process didn’t reply within an acceptable delay. |
Remarks
A NIC triggers the hardware interrupt whenever it consumes a buffer. However, if interrupt moderation is enabled, the NIC waits a minimum interval before sending another interrupt.
Only one Transmit event can be created per Physical Transmit Queue.
Characteristics
| Real-time | ||
|
Deterministic |
No |
|
| Local memory usage | ||
|
Process |
External MSpace usage |
Internal MSpace usage |
|
System |
No | Yes. This function will allocate memory for the Event kernel object. |
|
NL2 process |
No | Yes. This function will allocate memory for the object handle. |
|
Calling process |
No |
Yes. This function will allocate memory for the object handle. |
| Contiguous memory usage | ||
|
Usage |
No |
|
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
eRTOS 1.0 SDK |
Rtnl2Api.h |
Rtnl2Api.lib |
See Also: