320
K
A
DAK
AMX 86 Procedures
ajtkdel ajtkdel
Purpose Delete a Task
This procedure removes a task from your AMX system. Its task id will no
longer be valid.
Used by n Task o IS P o Timer Procedure o Restart Procedure n Exit Procedure
Setup AMXID taskid;
int priority;
int status;
.
.
status = ajtkdel(taskid, priority);
AX DX CX
Where taskid is the task id of the task to be deleted.
priority is the task execution priority at which the deletion is to occur.
The deletion priority must be lower than the priority of any task which
can affect the task being deleted. The deletion priority must be higher
than the priority of any permanently active compute bound task.
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 deletion is not allowed
The task has not yet given its permission to be deleted by
calling ajtktrm to specify a Task Termination Procedure.
A task can delete itself.
Restriction You must not delete 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 ajtkcre, ajtktrm