PRECEIVE(2)
NAME
preceive − get a message from a port
SYNOPSIS
char ∗preceive(portid)
int portid;
DESCRIPTION
Preceive retrieves the next message from the port portid, returning a pointer to the message if successful, or SYSERR if portid is invalid. (The sender and receiver must agree on a convention for passing the message length.)
The calling process is blocked if there are no messages available (and reawakened as soon as a message arrives). The only ways to be released from a port queue are for some other process to send a message to the port with PSEND(2) or for some other process to delete or reset the port with PDELETE(2) or PRESET(2).
SEE ALSO
pcount(2), pcreate(2), pdelete(2), preset(2), psend(2)
December 01, 1986 — Xinu Programmer’s Manual