diff --git a/include/boost/context/detail/config.hpp b/include/boost/context/detail/config.hpp index beec75f1..9de34fe7 100644 --- a/include/boost/context/detail/config.hpp +++ b/include/boost/context/detail/config.hpp @@ -30,10 +30,6 @@ # define BOOST_CONTEXT_DECL #endif -#if ! defined(BOOST_USE_UCONTEXT) && defined(__CYGWIN__) -# define BOOST_USE_UCONTEXT -#endif - #if ! defined(BOOST_CONTEXT_SOURCE) && ! defined(BOOST_ALL_NO_LIB) && ! defined(BOOST_CONTEXT_NO_LIB) # define BOOST_LIB_NAME boost_context # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTEXT_DYN_LINK) diff --git a/include/boost/context/fiber_ucontext.hpp b/include/boost/context/fiber_ucontext.hpp index 687e1c29..92e8fa4f 100644 --- a/include/boost/context/fiber_ucontext.hpp +++ b/include/boost/context/fiber_ucontext.hpp @@ -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 @@ class fiber_capture_record : public fiber_activation_record { #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 @@ class BOOST_CONTEXT_DECL fiber { 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 @@ class BOOST_CONTEXT_DECL fiber { 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; diff --git a/src/asm/make_x86_64_sysv_elf_gas.S b/src/asm/make_x86_64_sysv_elf_gas.S index 9336210a..cabebff6 100644 --- a/src/asm/make_x86_64_sysv_elf_gas.S +++ b/src/asm/make_x86_64_sysv_elf_gas.S @@ -133,6 +133,8 @@ make_fcontext: ret /* return pointer to context-data */ trampoline: + .cfi_startproc + .cfi_undefined rip /* store return address on stack */ /* fix stack alignment */ _CET_ENDBR @@ -147,6 +149,7 @@ trampoline: #endif /* jump to context-function */ jmp *%rbx + .cfi_endproc finish: _CET_ENDBR