Realistic 3D camera system
3D camera system components
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
asio-1.10.6
include
asio
detail
atomic_count.hpp
Go to the documentation of this file.
1
//
2
// detail/atomic_count.hpp
3
// ~~~~~~~~~~~~~~~~~~~~~~~
4
//
5
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6
//
7
// Distributed under the Boost Software License, Version 1.0. (See accompanying
8
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
//
10
11
#ifndef ASIO_DETAIL_ATOMIC_COUNT_HPP
12
#define ASIO_DETAIL_ATOMIC_COUNT_HPP
13
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15
# pragma once
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18
#include "
asio/detail/config.hpp
"
19
20
#if !defined(ASIO_HAS_THREADS)
21
// Nothing to include.
22
#elif defined(ASIO_HAS_STD_ATOMIC)
23
# include <atomic>
24
#else // defined(ASIO_HAS_STD_ATOMIC)
25
# include <boost/detail/atomic_count.hpp>
26
#endif // defined(ASIO_HAS_STD_ATOMIC)
27
28
namespace
asio
{
29
namespace
detail {
30
31
#if !defined(ASIO_HAS_THREADS)
32
typedef
long
atomic_count
;
33
inline
void
increment
(atomic_count& a,
long
b
) { a +=
b
; }
34
#elif defined(ASIO_HAS_STD_ATOMIC)
35
typedef
std::atomic<long>
atomic_count
;
36
inline
void
increment
(atomic_count& a,
long
b
) { a +=
b
; }
37
#else // defined(ASIO_HAS_STD_ATOMIC)
38
typedef
boost::detail::atomic_count
atomic_count
;
39
inline
void
increment
(atomic_count& a,
long
b) {
while
(b > 0) ++a, --
b
; }
40
#endif // defined(ASIO_HAS_STD_ATOMIC)
41
42
}
// namespace detail
43
}
// namespace asio
44
45
#endif // ASIO_DETAIL_ATOMIC_COUNT_HPP
asio::detail::atomic_count
long atomic_count
Definition:
atomic_count.hpp:32
config.hpp
asio::b
asio::basic_streambuf< Allocator > & b
Definition:
read.hpp:702
asio::detail::increment
void increment(atomic_count &a, long b)
Definition:
atomic_count.hpp:33
asio
Definition:
async_result.hpp:23
Generated by
1.8.11