]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/alienstore: use homebrew counting_semaphore
authorXuehan Xu <xxhdx1985126@gmail.com>
Tue, 27 Feb 2024 09:06:07 +0000 (17:06 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 7 May 2024 11:32:11 +0000 (14:32 +0300)
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>
(cherry picked from commit c884db34e049716577f7868b76685df182f82678)

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 {