BVB Source Codes

mars Show fences.hpp Source code

Return Download mars: download fences.hpp Source code - Download mars Source code - Type:.hpp
  1. /*
  2.  * Distributed under the Boost Software License, Version 1.0.
  3.  * (See accompanying file LICENSE_1_0.txt or copy at
  4.  * http://www.boost.org/LICENSE_1_0.txt)
  5.  *
  6.  * Copyright (c) 2011 Helge Bahmann
  7.  * Copyright (c) 2013 Tim Blechmann
  8.  * Copyright (c) 2014 Andrey Semashev
  9.  */
  10. /*!
  11.  * \file   atomic/fences.hpp
  12.  *
  13.  * This header contains definition of \c atomic_thread_fence and \c atomic_signal_fence functions.
  14.  */
  15.  
  16. #ifndef BOOST_ATOMIC_FENCES_HPP_INCLUDED_
  17. #define BOOST_ATOMIC_FENCES_HPP_INCLUDED_
  18.  
  19. #include <boost/memory_order.hpp>
  20. #include <boost/atomic/capabilities.hpp>
  21. #include <boost/atomic/detail/operations.hpp>
  22.  
  23. #ifdef BOOST_HAS_PRAGMA_ONCE
  24. #pragma once
  25. #endif
  26.  
  27. /*
  28.  * IMPLEMENTATION NOTE: All interface functions MUST be declared with BOOST_FORCEINLINE,
  29.  *                      see comment for convert_memory_order_to_gcc in ops_gcc_atomic.hpp.
  30.  */
  31.  
  32. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost {
  33.  
  34. namespace atomics {
  35.  
  36. #if BOOST_ATOMIC_THREAD_FENCE > 0
  37. BOOST_FORCEINLINE void atomic_thread_fence(memory_order order) BOOST_NOEXCEPT
  38. {
  39.     detail::thread_fence(order);
  40. }
  41. #else
  42. BOOST_FORCEINLINE void atomic_thread_fence(memory_order) BOOST_NOEXCEPT
  43. {
  44.     detail::lockpool::thread_fence();
  45. }
  46. #endif
  47.  
  48. #if BOOST_ATOMIC_SIGNAL_FENCE > 0
  49. BOOST_FORCEINLINE void atomic_signal_fence(memory_order order) BOOST_NOEXCEPT
  50. {
  51.     detail::signal_fence(order);
  52. }
  53. #else
  54. BOOST_FORCEINLINE void atomic_signal_fence(memory_order) BOOST_NOEXCEPT
  55. {
  56.     detail::lockpool::signal_fence();
  57. }
  58. #endif
  59.  
  60. } // namespace atomics
  61.  
  62. using atomics::atomic_thread_fence;
  63. using atomics::atomic_signal_fence;
  64.  
  65. } // namespace mars_boost
  66.  
  67. #endif // BOOST_ATOMIC_FENCES_HPP_INCLUDED_
  68.  
downloadfences.hpp Source code - Download mars Source code
Related Source Codes/Software:
Hero - Elegant transition library for iOS & tvOS 2017-06-09
deep-photo-styletransfer - Code and data for paper "Deep Photo Style Transfer... 2017-06-09
mastodon - A GNU Social-compatible microblogging server ... 2017-06-09
plyr - A simple HTML5, YouTube and Vimeo player ... 2017-06-08
prepack - Prepack is a partial evaluator for JavaScript. Pre... 2017-06-08
Public-APIs - 2017-06-09
lottie-ios - An iOS library to natively render After Effects ve... 2017-06-09
Awesome-Hacking - A collection of various awesome lists for hackers,... 2017-06-09
algorithms - Minimal examples of data structures and algorithms... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top