Commit d74eef3b by Chris Fairles Committed by Paolo Carlini

mutex (once_flag): Construct __gthread_once_t in a temporary variable before…

mutex (once_flag): Construct __gthread_once_t in a temporary variable before assigning to _M_once...

2008-09-04  Chris Fairles  <chris.fairles@gmail.com>

        * include/std/mutex (once_flag): Construct __gthread_once_t in a
	temporary variable before assigning to _M_once to avoid initialization
	errors.

From-SVN: r139986
parent d7f2fbf6
2008-09-04 Chris Fairles <chris.fairles@gmail.com>
* include/std/mutex (once_flag): Construct __gthread_once_t in a
temporary variable before assigning to _M_once to avoid initialization
errors.
2008-09-03 Paolo Carlini <paolo.carlini@oracle.com>
* config/abi/pre/gnu.ver: Also export __once_functor_lock; tighten
......
......@@ -615,8 +615,10 @@ namespace std
typedef __gthread_once_t __native_type;
once_flag()
: _M_once(__GTHREAD_ONCE_INIT)
{ }
{
__gthread_once_t __tmp = __GTHREAD_ONCE_INIT;
_M_once = __tmp;
}
once_flag(const once_flag&) = delete;
once_flag& operator=(const once_flag&) = delete;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment