Tool/software: Code Composer Studio
Hi ,
I would like to find if I started number of tasks and I have task name is set.
How I will find task handle of the task by this name.
How can do it programmatically.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hi ,
I would like to find if I started number of tasks and I have task name is set.
How I will find task handle of the task by this name.
How can do it programmatically.
Hi,
Refer to this post which I think should answer your question. If it doesn't, I will forward your question to our TI-RTOS experts.
https://e2e.ti.com/support/legacy_forums/embedded/tirtos/f/355/t/403066
Hi Charles:'xyz"
This is not my case. My case is to lookup in task list which running in a system and find one with instance->name = "xyz"
or it can be done by looking in system taskParams.env =
"xyz"
;
not by trying to find this params inside task.
Task_Handle_name(tsk) will return a pointer to the name of the task 'tsk'.
You can traverse the static and dynamically created tasks using the following code as an example:
Task_Handle tsk; /* traverse statically Created tasks */ for (i = 0; i < (Int)Task_Object_count(); i++) { System_printf("Name: %s\n", Task_Handle_name(Task_Object_get(NULL, i))); } tsk = Task_Object_first(); /* traverse dynamically Created tasks */ while (tsk) { System_printf("Name: %s\n", Task_Handle_name(tsk)); tsk = Task_Object_next(tsk); }
Dynamically constructed tasks are not linked together in any way so there are no built-in functions to traverse them.
Alan