Rtnl2DestroyLogicalRxQueue
Rtnl2DestroyLogicalRxQueue destroys a Logical Receive Queue created by Rtnl2CreateLogicalRxQueue.
Syntax
BOOL Rtnl2DestroyLogicalRxQueue(
[in] RTNAL_HLOGICAL_RX_QUEUE LogicalRxQueue
);
Parameters
[in] LogicalRxQueue
A handle to the Logical Receive Queue object to destroy.
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_NOT_READY |
The calling process has not called Rtnl2Init. |
ERROR_INVALID_PARAMETER |
The supplied Logical Receive Queue handle is invalid. |
RTNL2_ERROR_LOGICAL_RX_QUEUE_IN_USE |
Another thread of the calling process is executing Rtnl2ReceiveFromLogicalRxQueue at the same time. |
RTNL2_ERROR_LOGICAL_RX_QUEUE_IS_DESTROYING |
Another thread of the calling process is executing Rtnl2DestroyLogicalRxQueue at the same time. |
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_SERIALIZED_COMMAND_TIMEOUT |
The NL2 process didn’t reply within an acceptable delay. |
Remarks
After a successful call to this function, the supplied Logical Receive Queue handle is no longer valid and cannot be used as a parameter of other API functions.
Only the process that created a Logical Receive Queue is allowed to destroy it.
This function will fail if called while another thread of the NL2 Client is currently executing the Rtnl2ReceiveFromLogicalRxQueue function.
Characteristics
Real-time | ||
Deterministic |
No |
|
Local memory usage | ||
Process |
External MSpace usage |
Internal MSpace usage |
System |
No |
Yes. This function will potentially free the memory that was allocated for the Receive Event in the kernel object in Rtnl2CreateLogicalRxQueue. It might also free the memory that was allocated for other kernel objects in Rtnl2CreateLogicalRxQueue. |
NL2 process |
Yes. This function will free the memory that was allocated for the local buffers and the Logical Rx Queue structure in Rtnl2CreateLogicalRxQueue. Also, it may free the memory that was allocated for the driver state structure in Rtnl2CreateLogicalRxQueue, depending on the underlying driver. |
No |
Calling process |
No |
No |
Contiguous memory usage | ||
Usage |
No |
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
Rtnl2Api.h |
Rtnl2Api.lib |
See Also: