First public contribution.
1 // Copyright (C) 2001-2003
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_ONCE_WEK080101_HPP
8 #define BOOST_ONCE_WEK080101_HPP
10 #include <boost/thread/detail/config.hpp>
12 #if defined(BOOST_HAS_PTHREADS)
18 #if defined(BOOST_HAS_PTHREADS)
20 typedef pthread_once_t once_flag;
21 #define BOOST_ONCE_INIT PTHREAD_ONCE_INIT
23 #elif (defined(BOOST_HAS_WINTHREADS) || defined(BOOST_HAS_MPTASKS))
25 typedef long once_flag;
26 #define BOOST_ONCE_INIT 0
30 void BOOST_THREAD_DECL call_once(void (*func)(), once_flag& flag);
35 // 1 Aug 01 WEKEMPF Initial version.
37 #endif // BOOST_ONCE_WEK080101_HPP