NAME

mr_reply - reply to a thread

SYNOPSIS

#include <mrendez.h>

pthread_t mr_reply( void *response , pthread_t pthread_id );

DESCRIPTION

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.

NOTES

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.

RETURN VALUES

The return value is the pthread_id of the thread being replied to, or 0 on error.

ERRORS

EBADID
The pthread_id specified to be replied to does not represent any thread which is reply blocked on the caller.

SEE ALSO

mr_receive(), mr_send()




< Copyright Rowebots Research Inc. and Multiprocessor Toolsmiths Inc. 1987-2011 >