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.

[参考译文] CCS/TM4C1290NCPDT:重复的任务名称。

Guru**** 2524550 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/863465/ccs-tm4c1290ncpdt-duplicate-task-name

器件型号:TM4C1290NCPDT

工具/软件:Code Composer Studio

您好:

这里是我开发的代码的片段。

 sprintf (task_name、"%s"、"tcpwrk"、connection_count);
       taskParams.instance->name = task_name;
       connection_count++;

       taskHandle = Task_create ((Task_FuncPtr) tcpWorker、&taskParams、&EB);

我有多 个 tcpWorker 任务实例 ,但看起来它们在 ROV 中都具有相同的 ASK 名称。

如何使每个任务在 ROV 中都有其唯一的名称?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Sergey、

    名称不会被复制(以最大程度地减少内存使用)。 而是使用提供的名称的地址。 因此、如果您为所有实例提供相同的地址(在本例中为 task_name)、则所有实例都将具有相同的名称。 您需要为每个任务实例提供唯一的地址。

    Todd