Hi Paolo,

you once ask me to test your corrected rt_task_delete in the cvs. I did not make it yet to that point, I was stopped by a more critical problem showing up in the cvs but not in 3.1:

task_fun()
{
        while (1) {
                if (rt_sem_wait(&sem) == SEM_ERR)
                        return;

                /* do some stuff */
        }
}

init()
{
        rt_typed_sem_init(&sem, 0, CNT_SEM);
        rt_task_init(&task, task_fun, ...);
}

cleanup()
{
        rt_sem_delete(&sem);
        rt_task_delete(&task);
}

Gives some nice kernel crash, flodding my console without a chance to see the first error.

Do you see an obvious reason for this? Or should I dig deeper? I think something is terminated twice (1. by leaving task_fun, 2. by rt_task_delete) without catching this special case.

Jan


PS: I know it is not a nice way to shut down (with respect to SMP), but it is safe in our case because task_fun is known to block on the semaphore on deletion.

Reply via email to