374
K
A
DAK
Structure/Constant Definitions
AMX Task Status Block Structure
AMXSBS STRUC
;
AMSBTID DW ? ;task id
AMSBTAG1 DB ? ;task tag
AMSBTAG2 DB ?
AMSBTAG3 DB ?
AMSBTAG4 DB ?
AMSBST DD ? ;task status
AMSBSIG DD ? ;pending signals
AMSBTMR DD ? ;task timer (time remaining)
AMSBSLC DW ? ;time slice
AMSBCC DW ? ;call count
AMSBATR DW ? ;task attributes
AMSBIDC DW ? ;caller's task id
;(-1=ISP; 0=AATRIG)
AMSBCWAT DW ? ;caller waiting if <> 0
AMSBPRY DW ? ;task priority
AMSBMC0 DW ? ;message count; mailbox 0
AMSBMC1 DW ? ;message count; mailbox 1
AMSBMC2 DW ? ;message count; mailbox 2
AMSBMC3 DW ? ;message count; mailbox 3
;
AMXSBS ENDS
Task Status Masks (fields AMSBST, AMSBSIG)
; low word:
AMSBWTMR EQU 01H ;timer wait
;(used with other bits)
AMSBWTRG EQU 02H ;trigger wait (i.e. idle)
AMSBWSEM EQU 04H ;semaphore wait
AMSBWEVT EQU 08H ;event group wait
AMSBWXCH EQU 10H ;message exchange wait
AMSBWSND EQU 20H ;message send wait
AMSBWSUS EQU 40H ;suspended (waiting for resume)
AMSBWWAT EQU 80H ;waiting for wake
; high word:
AMSBWSIG EQU 7FFFH ;15 task signal waits
AMSBWORW EQU 8000H ;OR-wait on AMSBWSIG bits
Critical Function Codes (passed to Task Termination Procedure)
AMCFE EQU 1 ;AATKSTP - stop (end) task
AMCFK EQU 2 ;AATKILL - kill task
AMCFD EQU 3 ;AATKDEL - delete task