45 lines
985 B
C++
45 lines
985 B
C++
#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
|
|
#define BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
|
|
|
|
// MS compatible compilers support #pragma once
|
|
|
|
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
|
# pragma once
|
|
#endif
|
|
|
|
//
|
|
// boost/detail/spinlock.hpp
|
|
//
|
|
// Copyright (c) 2008 Peter Dimov
|
|
//
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
// See accompanying file LICENSE_1_0.txt or copy at
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
|
//
|
|
// struct spinlock
|
|
// {
|
|
// void lock();
|
|
// bool try_lock();
|
|
// void unlock();
|
|
//
|
|
// class scoped_lock;
|
|
// };
|
|
//
|
|
// #define BOOST_DETAIL_SPINLOCK_INIT <unspecified>
|
|
//
|
|
|
|
#include <boost/smart_ptr/detail/deprecated_macros.hpp>
|
|
|
|
#if defined(__clang__)
|
|
|
|
// Old Clang versions have trouble with ATOMIC_FLAG_INIT
|
|
# include <boost/smart_ptr/detail/spinlock_gcc_atomic.hpp>
|
|
|
|
#else
|
|
|
|
# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
|
|
|
|
#endif
|
|
|
|
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
|