File indexing completed on 2024-11-15 09:05:27
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_FIBERS_TYPE_H
0008 #define BOOST_FIBERS_TYPE_H
0009
0010 #include <atomic>
0011 #include <chrono>
0012 #include <exception>
0013 #include <functional>
0014 #include <map>
0015 #include <memory>
0016 #include <type_traits>
0017
0018 #include <boost/assert.hpp>
0019 #include <boost/config.hpp>
0020 #include <boost/context/detail/apply.hpp>
0021 #include <boost/context/stack_context.hpp>
0022 #include <boost/intrusive/list.hpp>
0023 #include <boost/intrusive/parent_from_member.hpp>
0024 #include <boost/intrusive_ptr.hpp>
0025 #include <boost/intrusive/set.hpp>
0026
0027 #include <boost/fiber/detail/config.hpp>
0028 #include <boost/fiber/detail/data.hpp>
0029 #include <boost/fiber/detail/decay_copy.hpp>
0030 #include <boost/fiber/detail/fss.hpp>
0031 #include <boost/fiber/detail/spinlock.hpp>
0032 #include <boost/fiber/exceptions.hpp>
0033 #include <boost/fiber/fixedsize_stack.hpp>
0034 #include <boost/fiber/properties.hpp>
0035 #include <boost/fiber/segmented_stack.hpp>
0036
0037 #ifdef BOOST_HAS_ABI_HEADERS
0038 # include BOOST_ABI_PREFIX
0039 #endif
0040
0041 namespace boost {
0042 namespace fibers {
0043
0044 enum class type {
0045 none = 0,
0046 main_context = 1 << 1,
0047 dispatcher_context = 1 << 2,
0048 worker_context = 1 << 3,
0049 pinned_context = main_context | dispatcher_context
0050 };
0051
0052 inline
0053 constexpr type
0054 operator&( type l, type r) {
0055 return static_cast< type >(
0056 static_cast< unsigned int >( l) & static_cast< unsigned int >( r) );
0057 }
0058
0059 inline
0060 constexpr type
0061 operator|( type l, type r) {
0062 return static_cast< type >(
0063 static_cast< unsigned int >( l) | static_cast< unsigned int >( r) );
0064 }
0065
0066 inline
0067 constexpr type
0068 operator^( type l, type r) {
0069 return static_cast< type >(
0070 static_cast< unsigned int >( l) ^ static_cast< unsigned int >( r) );
0071 }
0072
0073 inline
0074 constexpr type
0075 operator~( type l) {
0076 return static_cast< type >( ~static_cast< unsigned int >( l) );
0077 }
0078
0079 inline
0080 type &
0081 operator&=( type & l, type r) {
0082 l = l & r;
0083 return l;
0084 }
0085
0086 inline
0087 type &
0088 operator|=( type & l, type r) {
0089 l = l | r;
0090 return l;
0091 }
0092
0093 inline
0094 type &
0095 operator^=( type & l, type r) {
0096 l = l ^ r;
0097 return l;
0098 }
0099
0100 }}
0101
0102 #ifdef BOOST_HAS_ABI_HEADERS
0103 # include BOOST_ABI_SUFFIX
0104 #endif
0105
0106 #endif