]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/alienstore: use homebrew counting_semaphore 55801/head
authorXuehan Xu <xxhdx1985126@gmail.com>
Tue, 27 Feb 2024 09:06:07 +0000 (17:06 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Wed, 28 Feb 2024 06:19:49 +0000 (14:19 +0800)
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 <xxhdx1985126@gmail.com>
src/crimson/os/alienstore/thread_pool.h

index 78e18219a88a7143a7a84bb777abd796ca32f7db..7a21eb34b8a94ba32fca66abfe5ae2144528c4fe 100644 (file)
 #include <seastar/core/semaphore.hh>
 #include <seastar/core/sharded.hh>
 
-#if __cplusplus > 201703L
-#include <semaphore>
-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 {