ZestCode
 
Loading...
Searching...
No Matches
msg_buf_reset

message_buffer.h

int32_t msg_buf_reset( msg_buf_t xMessageBuffer );

Resets a message buffer to its initial empty state, discarding any message it contained.

A message buffer can only be reset if there are no tasks blocked on it.

Parameters
xMessageBufferThe handle of the message buffer being reset.
Returns
If the message buffer was reset then pdPASS is returned. If the message buffer could not be reset because either there was a task blocked on the message queue to wait for space to become available, or to wait for a a message to be available, then pdFAIL is returned.