In my userspace POSIX program, I get a '-1' return value from sem_timedwait, even when the function succeeds. When the function succeeds, errno is '-1' as well. I am using this workaround at the moment: result = sem_timedwait(&cas_sem, &wake_time); if (result < 0 && errno > 0) /* errno > 0 to work around xenomai bug */ { print_msg(WARN_MSG, "sem_wait returned with error code %d\n", errno); continue; } I am using xenomai 2.2.4, but I think the problem exists in other branches as well. I believe the attached patch against the trunk should fix the problem. Do you agree? Thanks, Jeff