Hi!

Sorry for asking so many questions on RT_MUTEX.

Docs on rt_mutex_acquire variants state:
-EINTR is returned if rt_task_unblock() was called for the current task.

This does not seems to be the case, pthread_mutex_lock() in lib/cobalt/mutex.c
does:
        do
                ret = XENOMAI_SYSCALL1(sc_cobalt_mutex_lock, _mutex);
        while (ret == -EINTR);

So, upon rt_task_unblock() the while loop does one more iteration but
blocks again
and the function will never return with -EINTR.

I guess the recommenced approach is posting a signal to a task before calling
rt_task_unblock()? Then the task can exit in a more or less controlled way.

-- 
Thanks,
//richard

Reply via email to