Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5752: boost::call_once() is unreliable on some platforms
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-03 14:03:01
#5752: boost::call_once() is unreliable on some platforms
----------------------------------------------------+-----------------------
Reporter: Matthew Dempsky <matthew@â¦> | Owner: viboes
Type: Bugs | Status: assigned
Milestone: Boost 1.52.0 | Component: thread
Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords: once
----------------------------------------------------+-----------------------
Comment (by fhess):
When SIG_ATOMIC_MAX is defined (that is, when I compile on Linux with g++
4.4.5 and -std=c++0x) call_once does not work. It never calls my function
at all. I debugged it, it happens because in thread/pthread/once.hpp in
the call_once method it compares epoch and this_thread_epoch. epoch is
set to 0 and this_thread_epoch is set to -1 so the comparison is false and
call once does nothing. It seems the problem is due to uintmax_atomic_t
being defined as a sig_atomic_t which turns out to be a signed rather than
unsigned type.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5752#comment:9> 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:10 UTC