From 19716b3acdc78f6b8bd62da3f30d74f012ae894b Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Tue, 27 Feb 2024 17:06:07 +0800 Subject: [PATCH] crimson/os/alienstore: use homebrew counting_semaphore std::counting_semaphore has the bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928, go back to our homebrew version Signed-off-by: Xuehan Xu (cherry picked from commit c884db34e049716577f7868b76685df182f82678) --- src/crimson/os/alienstore/thread_pool.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/crimson/os/alienstore/thread_pool.h b/src/crimson/os/alienstore/thread_pool.h index 78e18219a88a..7a21eb34b8a9 100644 --- a/src/crimson/os/alienstore/thread_pool.h +++ b/src/crimson/os/alienstore/thread_pool.h @@ -15,14 +15,10 @@ #include #include -#if __cplusplus > 201703L -#include -namespace crimson { - using std::counting_semaphore; -} -#else +// std::counting_semaphore is buggy in libstdc++-11 +// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928), +// so we switch back to the homebrew version for now. #include "semaphore.h" -#endif namespace crimson::os { -- 2.47.3