* You should not attempt to use it directly.
*/
-#ifndef __SGI_STL_INTERNAL_THREADS_H
-#define __SGI_STL_INTERNAL_THREADS_H
+#ifndef _STL_THREADS_H
+#define _STL_THREADS_H 1
#include <cstddef>
#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
namespace __gnu_cxx
{
- extern __gthread_mutex_t _GLIBCPP_mutex;
- extern __gthread_mutex_t *_GLIBCPP_mutex_address;
- extern __gthread_once_t _GLIBCPP_once;
- extern void _GLIBCPP_mutex_init (void);
- extern void _GLIBCPP_mutex_address_init (void);
+ extern __gthread_mutex_t _GLIBCXX_mutex;
+ extern __gthread_mutex_t *_GLIBCXX_mutex_address;
+ extern __gthread_once_t _GLIBCXX_once;
+ extern void _GLIBCXX_mutex_init (void);
+ extern void _GLIBCXX_mutex_address_init (void);
}
#endif
// There should be no code in this path given the usage rules above.
#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
if (_M_init_flag) return;
- if (__gthread_once (&__gnu_cxx::_GLIBCPP_once,
- __gnu_cxx::_GLIBCPP_mutex_init) != 0
+ if (__gthread_once (&__gnu_cxx::_GLIBCXX_once,
+ __gnu_cxx::_GLIBCXX_mutex_init) != 0
&& __gthread_active_p ())
abort ();
- __gthread_mutex_lock (&__gnu_cxx::_GLIBCPP_mutex);
+ __gthread_mutex_lock (&__gnu_cxx::_GLIBCXX_mutex);
if (!_M_init_flag)
{
// Even though we have a global lock, we use __gthread_once to be
// absolutely certain the _M_lock mutex is only initialized once on
// multiprocessor systems.
- __gnu_cxx::_GLIBCPP_mutex_address = &_M_lock;
+ __gnu_cxx::_GLIBCXX_mutex_address = &_M_lock;
if (__gthread_once (&_M_once,
- __gnu_cxx::_GLIBCPP_mutex_address_init) != 0
+ __gnu_cxx::_GLIBCXX_mutex_address_init) != 0
&& __gthread_active_p ())
abort ();
_M_init_flag = 1;
}
- __gthread_mutex_unlock (&__gnu_cxx::_GLIBCPP_mutex);
+ __gthread_mutex_unlock (&__gnu_cxx::_GLIBCXX_mutex);
#endif
}