mirror of
https://github.com/boostorg/context.git
synced 2026-01-19 04:02:17 +00:00
Renamed forced_unwind struct to fiber_forced_unwind in fiber_ucontext.hpp
This commit is contained in:
@@ -241,10 +241,10 @@ struct BOOST_CONTEXT_DECL fiber_activation_record_initializer {
|
||||
~fiber_activation_record_initializer();
|
||||
};
|
||||
|
||||
struct forced_unwind {
|
||||
struct fiber_forced_unwind {
|
||||
fiber_activation_record * from{ nullptr };
|
||||
|
||||
forced_unwind( fiber_activation_record * from_) noexcept :
|
||||
fiber_forced_unwind( fiber_activation_record * from_) noexcept :
|
||||
from{ from_ } {
|
||||
}
|
||||
};
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
#else
|
||||
c = std::invoke( fn_, std::move( c) );
|
||||
#endif
|
||||
} catch ( forced_unwind const& ex) {
|
||||
} catch ( fiber_forced_unwind const& ex) {
|
||||
c = Ctx{ ex.from };
|
||||
}
|
||||
// this context has finished its task
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
detail::fiber_activation_record * ptr = std::exchange( ptr_, nullptr)->resume();
|
||||
#endif
|
||||
if ( BOOST_UNLIKELY( detail::fiber_activation_record::current()->force_unwind) ) {
|
||||
throw detail::forced_unwind{ ptr};
|
||||
throw detail::fiber_forced_unwind{ ptr};
|
||||
} else if ( BOOST_UNLIKELY( nullptr != detail::fiber_activation_record::current()->ontop) ) {
|
||||
ptr = detail::fiber_activation_record::current()->ontop( ptr);
|
||||
detail::fiber_activation_record::current()->ontop = nullptr;
|
||||
@@ -507,7 +507,7 @@ public:
|
||||
std::exchange( ptr_, nullptr)->resume_with< fiber >( std::forward< Fn >( fn) );
|
||||
#endif
|
||||
if ( BOOST_UNLIKELY( detail::fiber_activation_record::current()->force_unwind) ) {
|
||||
throw detail::forced_unwind{ ptr};
|
||||
throw detail::fiber_forced_unwind{ ptr};
|
||||
} else if ( BOOST_UNLIKELY( nullptr != detail::fiber_activation_record::current()->ontop) ) {
|
||||
ptr = detail::fiber_activation_record::current()->ontop( ptr);
|
||||
detail::fiber_activation_record::current()->ontop = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user