General
Application areas: | Intertask communication; see "Intertask communication (ITC)"Communication; see "Communication (programs, users, system)" |
Macro type: | Type O; see "O-type macros" |
Macro description
A user participating in intertask communication may transfer a message to another ITC participant by means of the SEVNT macro.
Macro format and description of operands
SEVNT |
{sender-field,receiver-field / (1)} |
sender-field
Symbolic name of the field containing the message to be transferred. This field must start at a word boundary and must be constructed like a variable-length record (with 4 byte record length field):
Bytes 0-1: | record length in bytes = length of message +4 |
Bytes 2-3: | reserved |
Bytes 4-n: | message |
The message (including the record length field) must be at least 8 bytes long and must not exceed 65535 bytes.
receiver-name
ITC name of the participant which is to receive the message.
(1)
Specifies that register R1 contains the address of an operand field. The operand field must be aligned on a word boundary and have the following contents:
Byte 0-3: | Address of the sender field (format as described above). |
Byte 4-11: | ITC name of the receiver. If the name is shorter than 8 characters, the field |
Functional description
Each ITC participant may transfer a message to another participant by means of the SEVNT macro. The message may be between 4 bytes and 64 Kbytes long. It is transferred into the receive queue of the receiving ITC participant. The SEVNT macro is rejected if there is not enough system memory available, or if the total length of messages in the receive queue exceeds a predefined limit (128 K). The sending program is not automatically informed whether the receiver requests and analyzes the message from the receive queue. To obtain this information, the receiver would have to return a message as
acknowledgment. The task which includes the SEVNT call is not interrupted by the sending of the message.
An ITC participant may issue successive SEVNT calls to send messages to various receivers.
Return information and error flags
R15:
+---------------+ | | | | | | | | | | | |a|a| +---------------+
A return code relating to the execution of the SEVNT macro is transferred in the rightmost byte of register R15.
X'aa' | Meaning |
X'00' | The message was transferred to the receiving queue of the specified participant |
X'04' | Operand error (e.g. memory is not allocated or is not class 6 memory). The message was |
X'08' | The calling task is not an ITC participant. The message was not transferred |
X'0C' | Not enough system memory available or the internal limit for receive queues has already |
X'10' | The receiver is not (yet) an ITC participant, or the calling task is trying to transfer a message |