## NAME

mr_reply - reply to a thread

## SYNOPSIS

#include <mrendez.h>

pthread_t mr_reply( void *rply , pthread_t id );

## DESCRIPTION

The mr_reply() primitive is used to unblock the thread, specified by 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 rply argument. It is copied into the senders rply area.

## NOTES

The mr_reply() primitive is non-blocking.

The first two bytes (16 bits) found in the rply argument are taken to be the size, in bytes, of the entire message pointed to by rply. The lesser of this size and the size obtained from the sender's rply argument represents the number of bytes actually copied by the system.

## RETURN VALUES

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

## ERRORS

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

## SEE ALSO

mr_receive(), mr_send()

#### Home page (Kernel)

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