Taks kill in MQX

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Taks kill in MQX

652 Views
sarath_gs
Contributor II

I want to know about the status of a task which is running in MQX is there any functions for this ? also what is the task kill function in MQX? in linux pthread_kill , like is there any function in MQX? 

0 Kudos
1 Reply

592 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Sarath:

I would suggest you check the API

_task_get_td.

You can get the task descriptor , then you can check the state from the task descriptor.

2.1.274 _task_get_td
Gets a pointer to the task descriptor for the task ID.
Prototype
source\kernel\task.c
void *_task_get_td(
_task_id task_id)

For the task kill function, you can check

2.1.260 _task_destroy
Destroys the task.
Prototype
source\kernel\task.c
_mqx_uint _task_destroy(
_task_id task_id)

I hope it helps

Regards

Daniel

0 Kudos