tbb 2021.10.0 builds without using swapcontext, but we can just enable it again and link libucontext -- diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake index b60172c..98eb9f2 100644 --- a/cmake/compilers/GNU.cmake +++ b/cmake/compilers/GNU.cmake @@ -41,7 +41,7 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)") endif() if (NOT MINGW) - set(TBB_COMMON_LINK_LIBS dl) + set(TBB_COMMON_LINK_LIBS dl ucontext) endif() # Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled. diff --git a/include/oneapi/tbb/detail/_config.h b/include/oneapi/tbb/detail/_config.h index ad9f0f3..31e7de7 100644 --- a/include/oneapi/tbb/detail/_config.h +++ b/include/oneapi/tbb/detail/_config.h @@ -274,7 +274,7 @@ #define __TBB_CPP20_COMPARISONS_PRESENT 0 #endif -#define __TBB_RESUMABLE_TASKS (!__TBB_WIN8UI_SUPPORT && !__ANDROID__ && !__QNXNTO__ && (!__linux__ || __GLIBC__)) +#define __TBB_RESUMABLE_TASKS (!__TBB_WIN8UI_SUPPORT && !__ANDROID__ && !__QNXNTO__ && (__linux__)) /* This macro marks incomplete code or comments describing ideas which are considered for the future. * See also for plain comment with TODO and FIXME marks for small improvement opportunities.