NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
#include <mipc/chMipc.h>int msgRemove(int spaceLid, unsigned int msgQueueId, char *msg, unsigned int prio);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
MIPC
The msgRemove call removes the message whose address is msg from the message queue of the index msgQueueId in the message space spaceLid.
The prio argument must be identical to the priority provided to the msgPut system call previously invoked to post the message.
Upon successful completion, msgRemove returns 0. Otherwise, a negative error code is returned.
spaceLid is not valid.
msgQueueId is not a valid message queue.
msg is not a valid message address, or the corresponding message has already been consumed, or the priority is not the one affected when the message was put in the queue
It is possible that K_OK is returned when a message address is incorrect. This occurs when a message space has been inadvertently corrupted by a user actor. In that case, the internal MIPC primitives try to restore the message index if possible, and K_OK is returned when the message index has been successfully restored from the MIPC private data.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO