288
K
A
DAK
AMX 86 Procedures
ajsendp ajsendpPurpose Send a Message to a Task Mailbox
To request AMX to send a message to a task at a given priority and to
begin execution of that task as soon as possible.
Used by n Task n IS P n Timer Procedure n Restart Procedure n Exit Procedure
Setup AMXID taskid;
int priority;
int status;
int parm1;
int parm2;
.
.
status = ajsendp(taskid, priority, parm1, parm2...);
AX AASEND DX CX @ES:BX
Where taskid is the task id of the task to whom the message is to be sent.
priority is the priority of the message.
(0 = highest; 3 = lowest).
parm1, parm2... on the stack form the message to be copied to the
destination task. The number of bytes copied from the stack depends
on the AMX message size which is AMXMSZ bytes. AMXMSZ is
configured in the User Parameter File.
Results Interrupts are disabled and then restored to their state at the time of the
call.
Status is returned.
AEROK = Call successful
AERNST = Invalid task id
AERNME = No free message envelope
AERNMB = No task mailbox of the specified priority
AERMBF = Task mailbox is full
An immediate task switch will occur if the task to whom the message is
being sent is idle and is of higher priority than the current task.
Note The equivalent assembly language procedure is AASEND which receives the
parameters shown above.
See Also ajsend, ajsenw