HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

MAIL

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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:

ValueMeaning
0Mailbox empty.
1Contains previous outgoing mail from this calling process that the destination process has not yet collected.
2Contains incoming mail awaiting collection by this calling process. The length of the mail is returned in length.
3An error occurred, an invalid pin was specified, or a bounds check failed.
4Temporarily 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)

Feedback to webmaster