MSGQ_free
2-242
C Interface
Syntax
status = MSGQ_free(msg);
Parameters
MSGQ_Msg msg;
/* Message to be freed */
Return Value
Int
status;
/* status */
Reentrant
yes
Description
MSGQ_free frees a message back to the allocator.
If successful, this function returns SYS_OK.
This call is non-blocking and can be called from a HWI, SWI or TSK.
Constraints and
Calling Context
❏
The message must have been allocated via MSGQ_alloc.
Example
status = MSGQ_get(readerMsgQueue, (MSGQ_Msg *)msg,
SYS_FOREVER);
if (status != SYS_OK) {
SYS_printf("MSGQ_get call failed.");
}
// process message
MSGQ_free(msg);
See Also
MSGQ_free
Free a message