XPOST (Cross-Partition Post) Macro

The macro provides for cross-partition communication by posting the specified XECB (the macro sets bit 0 of byte 2 to 1).

An XPOST macro that is issued against an XECB causes the task that waits for this XECB to be removed from the wait state. This task might have issued an XWAIT, a WAIT or a WAITM with a previously defined XECB. The task might have been activated in the same or in another private partition within the same address space.

If the XPOST macro is used in a mainline loop, the macro should be preceded by a test, which ensures that the other partition 's task that wait for the event that is being posted must receive control and execute the function for which this event is a prerequisite.

To perform this test, a second XECB must be defined. This XECB allows the originally waiting task in its mainline loop to post completion of its function as an event for which the originally posting task must wait.

Resetting bit 0 of byte 2 of the XECB is a user responsibility.

Once a task has issued an XPOST macro for an XECB (with ACCESS=XWAIT), no other task can issue an XPOST for this XECB until the connection is ended.

Format

Read syntax diagramSkip visual syntax diagramnameXPOST XECB=xecbname(1)POINTRG=(14)

Requirements for the caller

AMODE:
24
RMODE:
24
ASC Mode:
Primary

Parameters

XECB=xecbname | (1)
Specifies the name of the XECB to be posted. The name that you specify must be the same as the one used to define the XECB. If register notation is used, the specified register must point to an 8-byte character field that contains the XECB name left-justified and padded with blanks. Do not specify 14 or 15 if you choose to use ordinary register notation.
POINTRG=(14)
Specifies the register that points to the XECB table entry associated with the named XECB. Do not specify register 1 or 15 if you choose to use ordinary register notation.

To obtain the address of the associated XECB table entry, issue earlier in the program an XECBTAB macro for the same XECB and with TYPE=CHECK or TYPE=DEFINE specified. When the system executes the XECBTAB macro, it returns, in register 14, the address of the pertinent XECB table entry. Figure 1, which shows a coding example for the use of the XWAIT macro, applies to the XPOST macro accordingly.

If the POINTRG register contains 0 (or any invalid value), all entries in the XECB table are searched to determine the correct address; no error is indicated.

Return Codes in Register 15

When the system returns control to the issuing task, register 15 contains one of the following return codes:
00
Successful completion. The named XECB has been posted.
04
The named XECB has no associated table entry in the XECB table.
0C
The named XECB is not within the current address space.
0D
The XECB referred to in the XPOST macro was defined with ACCESS=XPOST specified in the XECBTAB macro, but the task that issued the XPOST macro does not own this XECB.
0E
The XECB referred to in the XPOST macro was defined with ACCESS=XWAIT specified in the XECBTAB macro and either (1) the task that issued the XPOST macro also defined the XECB or (2) the XECB has been posted previously during the same execution by another task.
Note: Following the execution of an XPOST macro, registers 1 and 14 are set to zero.