Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/boost/thread/once.hpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 819 bytes
RevLine 
[29]1// Copyright (C) 2001-2003
2// William E. Kempf
3//
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)
6
7#ifndef BOOST_ONCE_WEK080101_HPP
8#define BOOST_ONCE_WEK080101_HPP
9
10#include <boost/thread/detail/config.hpp>
11
12#if defined(BOOST_HAS_PTHREADS)
13#   include <pthread.h>
14#endif
15
16namespace boost {
17
18#if defined(BOOST_HAS_PTHREADS)
19
20typedef pthread_once_t once_flag;
21#define BOOST_ONCE_INIT PTHREAD_ONCE_INIT
22
23#elif (defined(BOOST_HAS_WINTHREADS) || defined(BOOST_HAS_MPTASKS))
24
25typedef long once_flag;
26#define BOOST_ONCE_INIT 0
27
28#endif
29
30void BOOST_THREAD_DECL call_once(void (*func)(), once_flag& flag);
31
32} // namespace boost
33
34// Change Log:
35//   1 Aug 01  WEKEMPF Initial version.
36
37#endif // BOOST_ONCE_WEK080101_HPP
Note: See TracBrowser for help on using the repository browser.