reply to a message sent by another process
#include <sys/kernel.h> int Reply( pid_t pid, void *msg, unsigned nbytes );
The kernel function Reply() replies with nbytes of data pointed to by msg to the process identified by pid. The process pid must have sent a message that was received and not yet replied to. It must be in the REPLY BLOCKED state.
The number of bytes transferred is the minimum of that specified by both the replier and the sender. The reply data isn't allowed to overflow the reply buffer area provided by the sender.
The data transfer occurs immediately, and the replying task doesn't block. Reply() changes the state of the sending task from REPLY BLOCKED to READY. You should reply to every message that you receive, but you don't have to do so immediately.
Reply() is a simple cover function that builds a single part _mxfer_entry on the stack and calls Replymx(), which is the real kernel function. It's provided for convenience, since it's easier to use than Replymx() for simple messages.
See Send().
QNX
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes, but modifies errno |
Thread | Yes |
Reply() is a macro.
Creceive(), Creceivemx(), errno, Receive(), Receivemx(), Replymx(), Readmsg(), Readmsgmx(), Send(), Sendfd(), Sendfdmx(), Sendmx(), Writemsg(), Writemsgmx(), Trigger()