msgRespond#

Synopsis#

#include <sys/msg.h>

int msgRespond(uint32_t port, msg_t *m, unsigned long int rid);

Status#

Implemented

Conformance#

Phoenix-RTOS specific

Description#

Finishes the communication between processes by responding to sender of initial message msg with modified output buffer to port from which the message was read. Response ID rid specifies message context and should be passed from rid acquired via msgRecv() call.

This function is part of interprocess communication mechanisms in Phoenix-RTOS. For more information about messaging process and msg_t message structure please refer to Message Passing.

Return value#

If an error occurs during a function call an error value shall be returned. Otherwise, returns 0.

Errors#

This function shall fall if:

  • -EINVAL - port does not name an existing port, or port is closed

Tests#

Untested

Known bugs#

  • Does not check if message pointer m is not NULL.

See Also#

  1. IPC mechanisms in Phoenix-RTOS

  2. Standard library functions

  3. Table of Contents