#ifndef BOOST_FILESYSTEM_SRC_ATOMIC_TOOLS_HPP_
#define BOOST_FILESYSTEM_SRC_ATOMIC_TOOLS_HPP_
#include <boost/filesystem/config.hpp>
#if !defined(BOOST_FILESYSTEM_SINGLE_THREADED)
#include "atomic_ref.hpp"
namespace boost {
namespace filesystem {
namespace detail {
template< typename T >
BOOST_FORCEINLINE T atomic_load_relaxed(T& a)
{
return atomic_ns::atomic_ref< T >(a).load(atomic_ns::memory_order_relaxed);
}
template< typename T >
BOOST_FORCEINLINE void atomic_store_relaxed(T& a, T val)
{
atomic_ns::atomic_ref< T >(a).store(val, atomic_ns::memory_order_relaxed);
}
} } }
#else
namespace boost {
namespace filesystem {
namespace detail {
template< typename T >
BOOST_FORCEINLINE T atomic_load_relaxed(T const& a)
{
return a;
}
template< typename T >
BOOST_FORCEINLINE void atomic_store_relaxed(T& a, T val)
{
a = val;
}
} } }
#endif
#endif