[thread] wrong assertion following call to pthread_mutex_timedlock()?
25 Aug
2008
25 Aug
'08
3:21 p.m.
In boost 1.35 and 1.36 the implementation of mutex::timed_lock() and recursive_mutex::timed_lock() for posix-platforms with BOOST_PTHREAD_HAS_TIMEDLOCK defined looks like this: bool timed_lock(system_time const & abs_time) { struct timespec const timeout=detail::get_timespec(abs_time); int const res=pthread_mutex_timedlock(&m,&timeout); BOOST_ASSERT(!res || res==EBUSY); return !res; } The assertion following pthread_mutex_timedlock() always fails in case of a timeout since the system call returns ETIMEDOUT when timed out and not EBUSY (according to the open group specification http://www.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_timedl...) Best regards, Wolfgang
5913
Age (days ago)
5921
Last active (days ago)
1 comments
1 participants
participants (1)
-
Wolfgang Fertsak