mr_reply - reply to a thread
#include <mrendez.h>
The mr_reply() primitive is used to unblock the thread, specified by pthread_id, from which a message has been received with mr_receive() but not yet replied to. Data may be transmitted to that thread via the response argument. It is copied into the senders response area.
The mr_reply() primitive is non-blocking.
The first two bytes (16 bits) found in the response argument are taken to be the size, in bytes, of the entire message pointed to by response. The lesser of this size and the size obtained from the sender's response argument represents the number of bytes actually copied by the system.
The return value is the pthread_id of the thread being replied to, or 0 on error.