How can i change the thread name which is dynamically created ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How can i change the thread name which is dynamically created ?

1,116件の閲覧回数
chethanpandi
Contributor I

If change the name of one thread, it will change the name of the all threads dynamically created.

Ex : There are two threads T1 and T2. T1 is first creted, then T2 with same priority.

        If i change the name of T1 using template pointer, T2 name also get change to common name.

Please let me know with some solutions.

タグ(3)
0 件の賞賛
返信
2 返答(返信)

989件の閲覧回数
chethanpandi
Contributor I

Yes, i able to renaming the thread dynamically. But if i created threads dynamically by defining task template in local scope, with task index 0 and parameter as pointer to task template, if first thread renamed it renames all threads with common name.

If I rename the thread created from task template, with application-unique numbers, only that specified thread name only changed.

I followed below pseudo code to rename the thread,

TASK_TEMPLATE_STRUCT_PTR template_ptr;

template_ptr = _task_get_template_ptr(tid);

strcpy(template_ptr->TASK_NAME, "new_name");

0 件の賞賛
返信

989件の閲覧回数
RadekS
NXP Employee
NXP Employee

I suppose that you want change MQX tasks name (task=thread). Correct?

Could you please closer specify how did you change task name by template pointer?

Did you create new template list in RAM (copy of old one), edit names in this table and change pointer in MQX_init_struct to this new template list? Or you renamed tasks different way?

Which version of MQX you use?

0 件の賞賛
返信