HP 3000 Manuals

MAIL [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation


MPE/iX Intrinsics Reference Manual

MAIL 

NM and CM callable.

Determines the status of the mailbox used by its parent or child.
Process handling (PH) capability is required.

Syntax 
_____________________________________
|                                   |
|        U16         I16V  I16      |
|     mailstatus:=MAIL(pin,length); |
_____________________________________

            

Functional Return 

mailstatus            16-bit unsigned integer (assigned functional 
                      return) 

                      Returns the status of the mailbox:

                         Value    Meaning 

                           0      Mailbox empty.

                           1      Contains previous outgoing mail from this calling
                                  process that the destination process has not yet
                                  collected.

                           2      Contains incoming mail awaiting collection by this
                                  calling process.  The length of the mail is returned
                                  in length.

                           3      An error occurred, an invalid pin was specified, or a
                                  bounds check failed.

                           4      Temporarily inaccessible, other intrinsics are using
                                  it in the preparation or analysis of mail.

Parameters 

pin                   16-bit signed integer by value (required) 

                      Passes the mailbox to be tested.  If pin specifies
                      the mailbox of a child process, it must be the
                      process identification number (PIN) of that child.
                      Zero specifies the mailbox of a parent process.

length                16 bit signed integer by reference (required) 

                      Returns the length, in half words, of any incoming
                      mail in the mailbox.

Operation Notes 

If the mailbox contains mail that is awaiting collection by this process,
the length of this message (in half words) is returned to the calling
process in the length parameter.  This enables the calling process to
initialize its stack in preparation for receipt of the message.

Condition Codes 

CCE (2)               Request granted.  The mailbox mailstatus was
                      tested.

CCG (0)               Request denied.  An illegal pin parameter was
                      specified.  The value of 3 is returned to the
                      calling process through mailstatus.

CCL (1)               Request denied.  The length parameter defines stack
                      address that does not have write access.

Related Information 

Intrinsics            None

Commands              None

Manuals               Interprocess Communication Programmer's Guide 
                      (32650-90019)



MPE/iX 5.0 Documentation