The $SETAFF macro generates in-line code to manipulate
the data areas related to system affinity. These data areas are:
- The complete system affinity mask, where each bit in the mask
represents a unique system.
- The system id number.
- The system affinity token (for a definition of the format of a
system affinity token, see the description of the AFTOKEN parameter).
Format description
>>-+--------+--$SETAFF------------------------------------------>
'-symbol-'
>--REQUEST--=--+---------------------------------------------------------------------------------------------------------------------+-->
+-+-ANY-----+--,--AFFIELD--=--mask------------------------------------------------------------------------------------+
| +-ALL-----+ |
| +-CLEAR---+ |
| '-REVERSE-' |
+-+-TESTANY--+--,--AFFIELD--=--mask--+-PASS--=--br--+----------------+-+----------------------------------------------+
| +-TESTNONE-+ | '-,--FAIL--=--br-' | |
| '-TESTALL--' '-FAIL--=--br--+----------------+-' |
| '-,--PASS--=--br-' |
+-+-TEST-----+--,--AFFIELD--=--mask--+-,--ID--=--mem-num-----------------------+--+-PASS--=--br--+----------------+-+-+
| '-TESTONLY-' +-,--AFTOKEN--=--token--------------------+ | '-,--FAIL--=--br-' | |
| '-,--AFTOKEN--=--token--,--ID--=--mem-num-' '-FAIL--=--br--+----------------+-' |
| '-,--PASS--=--br-' |
+-+-ADD----+--,--AFFIELD--=--mask--+-,--ID--=--mem-num-----------------------+----------------------------------------+
| +-MOVE---+ +-,--AFTOKEN--=--token--------------------+ |
| '-REMOVE-' '-,--AFTOKEN--=--token--,--ID--=--mem-num-' |
'-,--AFFIELD--=--mask--+-PASS--=--br--+----------------+-+------------------------------------------------------------'
| '-,--FAIL--=--br-' |
'-FAIL--=--br--+----------------+-'
'-,--PASS--=--br-'
>--+------------------------------+----------------------------><
'-,--REGAREA--=--register-area-'
- AFFIELD=
- The full affinity field that is to be acted upon.
The specification can be an RX-type address or a registers (2-12).
- AFTOKEN=
- The affinity token to be used. The specification
can be an RX-type address or a register (2-12). The format is a 1-byte
mask, plus a 2-byte offset into entire mask.
- mask
- The single system affinity bit of a particular system.
- offset
- The offset to the byte in the full affinity field where the mask
bit resides.
- ID=
- A numeric system number that is to be converted to
the affinity token format. The affinity token format is either be
returned in the AFTOKEN field or used to perform the requested function
on the affinity field. The specification can be an RX-type address
or a register (2-12).
- FAIL=
- Specifies a label to be branched to or a register
to be branched on if the test requested by either REQUEST=TEST, REQUEST=TESTANY,
REQUEST=TESTALL, REQUEST=TESTNONE, or REQUEST=TESTONLY is false. Either
this parameter or FAIL (or both) MUST be specified for REQUEST=TEST|TESTANY|TESTALL|TESTNONE|TESTONLY.
- PASS=
- Specifies a label to be branched to or a register
to be branched on if the test requested by either REQUEST=TEST, REQUEST=TESTANY,
REQUEST=TESTALL, REQUEST=TESTNONE, or REQUEST=TESTONLY is true. Either
this parameter or FAIL (or both) MUST be specified for
REQUEST=TEST|TESTANY|TESTALL|TESTNONE|TESTONLY.
- REGAREA=
- An area where registers 0,1,14,15 are to be saved
and restored from by this macro. It must be an RX-type address. Registers
are not valid.
Attention: This macro might destroy the
contents of R0, R1, R14 and R15 unless you provide the REGAREA= keyword.
- REQUEST=
- Requested function to be performed.
- ADD
- Add the system identified by either AFFIELD or AFTOKEN
to the specified affinity field. The required parameters are AFFIELD
and either ID or AFTOKEN.
Note: If both ID= and AFTOKEN= are specified
for a request of ADD, REMOVE, TEST, or MOVE, the ID is first converted
into a token and placed in the field pointed to by AFTOKEN=. After
this conversion, the requested function is performed.
- ANY
- Set an affinity of ANY in the field passed. The required parameter
is AFFIELD.
- ALL
- Set an affinity of ALL. The required parameter is AFFIELD. ALL
is a synonym of ANY.
- CLEAR
- Clear out the affinity field as AFFIELD.
- MOVE
- Set the affinity to the one system represented by
ID or AFTOKEN. The required parameters are AFFIELD and either ID or
AFTOKEN.
Note: If both ID= and AFTOKEN= are specified for a request
of ADD, REMOVE, TEST, or MOVE, the ID is first converted into a token
and placed in the field pointed to by AFTOKEN=. After this conversion,
the requested function is performed.
- REMOVE
- Remove the system identified by either AFFIELD or
AFTOKEN from the specified affinity field. The required parameters
are AFFIELD and either ID or AFTOKEN.
Note: If both ID= and AFTOKEN=
are specified for a request of ADD, REMOVE, TEST, or MOVE, the ID
is first converted into a token and placed in the field pointed to
by AFTOKEN=. After this conversion, the requested function is performed.
- RETURN
- Build an affinity token from the passed ID field
and return it in the AFTOKEN field. The required parameters are ID
and AFTOKEN.
- REVERSE
- Remove all systems currently in the affinity field
and add all the systems that are not in the field. The required parameter
is AFFIELD.
- TEST
- Determine whether the system identified by either ID or TOKEN
is represented in the affinity field. The required parameters are
AFFIELD, either ID or AFTOKEN, and either PASS or FAIL.
Note: If both
ID= and AFTOKEN= are specified for a request of ADD, REMOVE, TEST,
or MOVE, the ID is first converted into a token and placed in the
field pointed to by AFTOKEN=. After this conversion, the requested
function is performed.
- TESTANY
- Test the affinity field to determine whether or not
the affinity field represents an affinity of ANY. Determine whether
the affinity field represents an affinity of ANY. The required parameters
are AFFIELD and either PASS or FAIL.
- TESTALL
- Determine whether the affinity field represents an affinity of
ALL. The required parameters are AFFIELD and either PASS or FAIL.
TESTALL is a synonym of TESTANY.
- TESTNONE
- Determine whether the affinity field is completely
empty. The required parameters are AFFIELD and either PASS or FAIL.
- TESTONLY
- Determine whether the system identified by either ID or TOKEN
is the only system represented in the affinity field. The required
parameters are AFFIELD, either of ID and AFTOKEN, and either of PASS
and FAIL.
Note: If both ID= and AFTOKEN= are specified for a request
of ADD, REMOVE, TEST, or MOVE, the ID is first converted into a token
and placed in the field pointed to by AFTOKEN=. After this conversion,
the requested function is performed.
Return codes
None. For a test request (any of REQUEST=TEST, REQUEST=TESTANY,
REQUEST=TESTALL, REQUEST=TESTNONE, REQUEST=TESTONLY), either PASS=
or FAIL= (or both) MUST be coded.
|