Here's a snippet of a dynamic task creation:
tsk_attrs = TSK_ATTRS;
tsk_attrs.priority = 2;
tsk_attrs.name = "Test";
tsk = TSK_create((Fxn)TestTask, &tsk_attrs);
The task function is this:
void TestTask()
{
while (1)
{
TSK_sleep(1000);
}
}
However, the return value of TSK_create is 0, indicating it failed. I cannot see any reason why it would fail. Any suggestions?