os/ossrv/ossrv_pub/boost_apis/boost/thread/once.hpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (C) 2001-2003
sl@0
     2
// William E. Kempf
sl@0
     3
//
sl@0
     4
//  Distributed under the Boost Software License, Version 1.0. (See accompanying 
sl@0
     5
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
sl@0
     6
sl@0
     7
#ifndef BOOST_ONCE_WEK080101_HPP
sl@0
     8
#define BOOST_ONCE_WEK080101_HPP
sl@0
     9
sl@0
    10
#include <boost/thread/detail/config.hpp>
sl@0
    11
sl@0
    12
#if defined(BOOST_HAS_PTHREADS)
sl@0
    13
#   include <pthread.h>
sl@0
    14
#endif
sl@0
    15
sl@0
    16
namespace boost {
sl@0
    17
sl@0
    18
#if defined(BOOST_HAS_PTHREADS)
sl@0
    19
sl@0
    20
typedef pthread_once_t once_flag;
sl@0
    21
#define BOOST_ONCE_INIT PTHREAD_ONCE_INIT
sl@0
    22
sl@0
    23
#elif (defined(BOOST_HAS_WINTHREADS) || defined(BOOST_HAS_MPTASKS))
sl@0
    24
sl@0
    25
typedef long once_flag;
sl@0
    26
#define BOOST_ONCE_INIT 0
sl@0
    27
sl@0
    28
#endif
sl@0
    29
sl@0
    30
void BOOST_THREAD_DECL call_once(void (*func)(), once_flag& flag);
sl@0
    31
sl@0
    32
} // namespace boost
sl@0
    33
sl@0
    34
// Change Log:
sl@0
    35
//   1 Aug 01  WEKEMPF Initial version.
sl@0
    36
sl@0
    37
#endif // BOOST_ONCE_WEK080101_HPP