AMX 86 Procedures
K
A
DAK
287
ajsend ajsendPurpose 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;
char msg[AMXMSZ];
int status;
.
.
status = ajsend(taskid, priority, msg);
AX 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).
msg is an array name or pointer to AMXMSZ consecutive bytes that form the
message to be copied to the destination task. The message may be any
AMXMSZ byte structure. 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.
See Also ajsendp, ajsenw