MPE/iX Intrinsics Reference Manual (32650-90875)

Chapter 10 595
Command Definitions (QUIT-ZSIZE)
RECEIVEMAIL
1 Wait until incoming mail is ready for collection.
Operation Notes
The RECEIVEMAIL intrinsic lets a process collect mail transmitted to it by its parent or a
child. If the mailbox for the receiving process is empty, the action taken depends on the
waitflag
parameter specified in the RECEIVEMAIL intrinsic call. If the mailbox is currently
in use by another process, RECEIVEMAIL waits until the mailbox is free before accessing it.
Condition Codes
CCE (2) Request granted. The mail was collected (value 2 is returned to
mailstatus
) or the mail was not collected because the mailbox contained
outgoing mail from the receiving process (value 1 is returned to
mailstatus
).
CCG (0) Request denied. An illegal
pin
parameter (value 3 is returned to
mailstatus
).
CCL (1) Request denied. The
location
parameter does not allow write access on
the stack address (value 3 is returned to
mailstatus
) or because both
sending and receiving processes are waiting for incoming mail, causing a
deadlock (value 4 is returned to
mailstatus
).
Related Information
Manual Interprocess Communication Programmer's Guide