Subject: [Boost-bugs] [Boost C++ Libraries] #11035: BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE and BOOST_PTHREAD_HAS_TIMEDLOCK not defined for Android
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-02-16 15:34:35
#11035: BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE and BOOST_PTHREAD_HAS_TIMEDLOCK not
defined for Android
-------------------------------------+----------------------
Reporter: kervala@⦠| Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.57.0 | Severity: Problem
Keywords: android recursive_mutex |
-------------------------------------+----------------------
I'm using boost::recursive_mutex under Android and I noticed they don't
work as expected, they are working like standard mutex.
After further investigation, I noticed BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
and BOOST_PTHREAD_HAS_TIMEDLOCK were not defined for Android because
Android NDK don't declare _POSIX_TIMEOUTS neither _XOPEN_SOURCE that are
checked in boost. So boost::recursive_mutex are not recursive at all under
Android :(
Also pthread_mutex_timedlock signature changed since Android 5.0 (API 21),
the version with the const struct is used from API 21 while previous
versions were using the same without the const.
from API 3 to 20:
int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
from API 21:
int pthread_mutex_timedlock(pthread_mutex_t*, const struct timespec*)
__nonnull((1, 2));
I have some patches to fix these issues :)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11035> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC