This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] Fix shared_timed_mutex::try_lock_until() et al
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 Apr 2015 11:21:32 +0100
- Subject: Re: [patch] Fix shared_timed_mutex::try_lock_until() et al
- Authentication-results: sourceware.org; auth=none
- References: <20150407142830 dot GG9755 at redhat dot com> <1428512373 dot 924 dot 26 dot camel at triegel dot csb> <20150408191159 dot GQ9755 at redhat dot com> <20150408193808 dot GR9755 at redhat dot com> <1428624966 dot 924 dot 32 dot camel at triegel dot csb> <20150410083757 dot GV9755 at redhat dot com> <1428659777 dot 2909 dot 1 dot camel at triegel dot csb>
On 10/04/15 11:56 +0200, Torvald Riegel wrote:
Ah, right. I was confused by the name, thinking those targets don't
support pthread_mutex_timedlock, not pthread_rwlock_timedrdlock etc.
The macro actually relates to the _POSIX_TIMEOUTS macro, but was
originally added to check for pthread_mutex_timedlock support, hence
its name. Maybe a better name would be _GLIBCXX_USE_MUTEX_TIMEOUTS.
Both pthread_mutex_timedlock and pthread_rwlock_timed??lock were
originally part of the POSIX Timeouts option, so on older POSIX
systems they are only available when _POSIX_TIMEOUTS is defined.
(They are part of the base spec in the current POSIX standard, but
Darwin and HPUX don't implement that and still treat them as
optional.)