AMX 86 Frozen Dessert Maker User Manual


 
324
K
A
DAK
AMX 86 Procedures
ajtkstp ajtkstp
Purpose Stop Execution of Task
This procedure will force a ready, executing or suspended task to end.
Used by
n Task n ISP n Timer Procedure o Restart Procedure n Exit Procedure
Setup AMXID taskid;
int status;
.
.
status = ajtkstp(taskid);
AX DX
Where taskid is the task id of the task to be stopped.
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
AERANA = Task termination is not allowed
The task has not yet given its permission to be stopped by
calling ajtktrm to specify a Task Termination Procedure.
If a task is waiting for the task being stopped to acknowledge receipt of its
message sent via ajsenw, that task will be allowed to resume execution.
A task can stop itself.
Restriction You must not stop a task which is waiting, or is about to wait, for a
resource or counting semaphore, events in an event group or a message on
a message exchange. Failure to observe this restriction may lead to
unexpected and unpredictable faults.
See Also ajtkill, ajtkdel, ajtktrm