IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


RTX_EC RTX_Kill_Task ( RTX_ID  taskId  ) 

The execution of specified task is stopped and the task is placed back at its start gate. The task remains present in the system awaiting a trigger.

This API is nearly the same as RTX_End_Task(). The difference is that this API will erase any trigger counts that were pending so that the task will not restart immediately due to stored triggers.

A task can kill itself.

The system will not kill a task which is inside an @CHIP-RTOS-PPC system call until that task has reached the return point from the system call. Exceptions to this rule are the RTX functions which block, such as RTX_Sleep_Request(), RTX_Sem_Wait() and so on for which the system will automatically remove the wait condition so that the task kill action occurs immediately. If a task was waiting on a TCP/IP socket, closing the socket would allow the task kill action to complete.

If the task being killed was waiting on a kernel object (semaphore, Event Group or Message Exchange), it will automatically be removed from that objects wait queue by this API. Any resource semaphores that where owned by this task being killed will be automatically freed by the system. (Note that the status of any counting semaphores has no association to a task by which the system could automatically "release" ownership.)

This API will resume a suspended task and awake a sleeping task.

This API may be called from inside an RTX ISR.

Parameters:
taskId Task handle specifying which task to kill.
Returns:
Zero on success, else error code.
See also:
RTX_End_Task()     RTX_Trigger_Task()     RTX_Delete_Task()
Compatibility:
This same API in the SC1x, SC2x and SC1x3 C-Library did not permit tasks to be killed which were waiting on a kernel object. (A reverse compatiblity consideration.)
Since:
SC2x3 V1.00 - CLIB V1.00





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:37 2017 by Doxygen 1.6.1