NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
#include <mipc/chMipc.h>int msgFree(int spaceLid, char *msg);
MIPC
msgFree returns to the message space identified by spaceLid a message, which was previously allocated by msgAllocate(2K) from the same message space, or which was previously received by msgGet(2K) from a message queue of the same message space.
With MIPC_S, the only valid value for spaceLid is 0.
msg is the address of the message within the addressing space of the caller.
msgFree converts msg into the corresponding internal message resource, from which it finds its associated message pool. If a thread is blocked waiting for a message of the pool to become available, it is awakened, and the freed message is given to it. Otherwise, the freed message is appended to the pool.
Upon successful completion, msgFree returns zero. Otherwise, a negative error code is returned.
spaceLid is not valid.
msg is not a valid message address, or the corresponding internal message resource is not in the allocated state.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO