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.
工具/软件:TI-RTOS
您好!
我使用以下版本进行应用开发。
CCS - 6.2.
TI RTOS - tirtos_tivac_2_16_01_14
NDK - NDK_2_25_00_09
BIOS - BIOS_6_45_02_31
我想使用 Task_create() API 从另一个任务动态创建任务。 但它返回 NULL 并且任务未被创建。 查找用于创建任务的以下代码。
Task_handle userPgmHandle;
Task_Params userPgmParams;
Task_Params_init (&userPgmParams);
userPgmParams.STACKSIZE = 2048;
userPgmParams.priority = 5;
userPgmHandle =
Task_create ((Task_FuncPtr) UserFunc、&userPgmParams、&EB);
if (userPgmHandle == NULL){
System_printf ("用户程序启动失败\n");
}
但是、在 tcpHandlerHook 函数中添加任务时、创建任务的代码相同。
我还向 CFG 文件中添加了以下代码。
/*允许运行时创建/内存分配*/
VAR 默认值= xdc.useModule('xdc.runtime.Defaults');
VAR 类型= xdc.useModule('xdc.runtime.Types');
Defaults.common$.memoryPolicy = types.create_policy;
BIOS.runtimeCreatesEnabled = true;
如果我将上述代码添加到 cfg 文件中、则在运行时收到以下错误。
TI.SYSBIOS.KNL.Semaphore:删除策略错误
xdc.runtime.Error.raise:终止执行
这里错过了什么?
此致
巴拉
您好 Todd、
在这里、我已经尝试使用默认的 hello world 示例项目、但这对我也不起作用。
有一个静态任务,即在 cfg 文件中创建的 task0fxn,我正尝试从该任务创建动态任务,即。
我在这里附上了代码。 请检查并建议解决方案。
此致
巴拉