I am using the RL-RTX Kernel
What I am trying to do is delete a task before it is created.
As I understand the docs for os_tsk_delete it should return OS_R_NOK if the task cannot be deleted.
For some reason the Kernel gets stuck in the idle task.
Here is some code:
if (os_tsk_delete (id_BiasSupply) == OS_R_OK) { /* task deleted */ id_BiasSupply = os_tsk_create (BiasSupply, 1); SetBiasSupplyTenthVolts (0, 10); } else { /* Task not deleted */ id_BiasSupply = os_tsk_create (BiasSupply, 1); SetBiasSupplyTenthVolts (0, 10); }
In the Keil simulator the statement: id_BiasSupply = os_tsk_create (BiasSupply, 1); never gets executed the kernel just stays in the idle task. Any ideas?
The reason that I want to do this is that I want to make sure that more than one instance of the task is not running at the same time. So I want to just delete the task and if the delete fails then I can go ahead and create the task.
which device are you using?