hi,
I have some scheduling problems with my application when I 'm deleting task with the fucntion os_tsk_delete in ARTX
My application freeze and when I'm inspecting state of task with µVision3, I can see two thing : - Sometimes the priority of the task had changed. it is not the priority that i have given when in create the task with os_create_task functions so my application don't running correctly - The other result is that only scheduler task (highest priority) is running as my TCB's structure has been damaged.
Can I delete a running task ?
What's happened when you delete a task A which had created task B and C ?
thanks for yor help
thanks for your help. I believe I have found my problem. I think there is a trouble in ARTX when you delete a task which have taken a mutex with os_mut_wait function. if this task didn't release the mutex before being deleted, all other task using the same mutex stop (wait free mutex).
Are you sure that all kernel object create by a task have been deleted when you delete a task ?
Yes, If task A "owns" a mutex and then task A is deleted, no other task will be able to aquire the mutex and A will still own it (even thoght there is no longer any A).
That is how it behaves.
Any memory allocated by a task and not freed before a delete will still be allocated with no way to know how to free it.
Any Mutxes owned by a task before a delete will still be "owned" with no way to know how to release it.