/usr/include/c++/11
NameSizeModeActions
backward/-0755rm
bits/-0755rm
debug/-0755rm
decimal/-0755rm
experimental/-0755rm
ext/-0755rm
parallel/-0755rm
pstl/-0755rm
tr1/-0755rm
tr2/-0755rm
algorithm30450644editdlrm
any187580644editdlrm
array138200644editdlrm
atomic488000644editdlrm
barrier80260644editdlrm
bit121870644editdlrm
bitset459950644editdlrm
cassert16480644editdlrm
ccomplex13350644editdlrm
cctype24090644editdlrm
cerrno17700644editdlrm
cfenv20510644editdlrm
cfloat18890644editdlrm
charconv197610644editdlrm
chrono972120644editdlrm
cinttypes21570644editdlrm
ciso64614640644editdlrm
climits19130644editdlrm
clocale19050644editdlrm
cmath493820644editdlrm
codecvt52750644editdlrm
compare282710644editdlrm
complex567030644editdlrm
complex.h15960644editdlrm
concepts122300644editdlrm
condition_variable127800644editdlrm
coroutine91560644editdlrm
csetjmp19490644editdlrm
csignal18550644editdlrm
cstdalign14070644editdlrm
cstdarg18680644editdlrm
cstdbool14010644editdlrm
cstddef66900644editdlrm
cstdint23350644editdlrm
cstdio44390644editdlrm
cstdlib63250644editdlrm
cstring31560644editdlrm
ctgmath13600644editdlrm
ctime22980644editdlrm
cuchar22100644editdlrm
cwchar65420644editdlrm
cwctype27930644editdlrm
cxxabi.h222800644editdlrm
deque39730644editdlrm
exception50170644editdlrm
execution18030644editdlrm
fenv.h20200644editdlrm
filesystem16450644editdlrm
forward_list26900644editdlrm
fstream406800644editdlrm
functional402000644editdlrm
future522780644editdlrm
initializer_list30380644editdlrm
iomanip165470644editdlrm
ios16010644editdlrm
iosfwd75130644editdlrm
iostream26970644editdlrm
istream340980644editdlrm
iterator27510644editdlrm
latch27320644editdlrm
limits716740644editdlrm
list36570644editdlrm
locale14880644editdlrm
map39290644editdlrm
math.h45730644editdlrm
memory45130644editdlrm
memory_resource211130644editdlrm
mutex242230644editdlrm
new83490644editdlrm
numbers62440644editdlrm
numeric261100644editdlrm
optional401700644editdlrm
ostream259760644editdlrm
queue24670644editdlrm
random16920644editdlrm
ranges1072010644editdlrm
ratio201080644editdlrm
regex28610644editdlrm
scoped_allocator176490644editdlrm
semaphore30000644editdlrm
set37990644editdlrm
shared_mutex245880644editdlrm
source_location27470644editdlrm
span131310644editdlrm
sstream392310644editdlrm
stack23910644editdlrm
stdexcept98780644editdlrm
stdlib.h22480644editdlrm
stop_token159820644editdlrm
streambuf298900644editdlrm
string46450644editdlrm
string_view261570644editdlrm
syncstream83300644editdlrm
system_error150060644editdlrm
tgmath.h13600644editdlrm
thread59190644editdlrm
tuple627670644editdlrm
typeindex35120644editdlrm
typeinfo77460644editdlrm
type_traits1076670644editdlrm
unordered_map34670644editdlrm
unordered_set33400644editdlrm
utility148160644editdlrm
valarray406950644editdlrm
variant628660644editdlrm
vector42750644editdlrm
version92640644editdlrm
Edit: /usr/include/c++/11/semaphore (3000B)
// -*- C++ -*- // Copyright (C) 2020-2021 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . /** @file include/semaphore * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_SEMAPHORE #define _GLIBCXX_SEMAPHORE 1 #pragma GCC system_header #if __cplusplus > 201703L #include #if __cpp_lib_atomic_wait || _GLIBCXX_HAVE_POSIX_SEMAPHORE namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_semaphore 201907L template class counting_semaphore { static_assert(__least_max_value >= 0); static_assert(__least_max_value <= __semaphore_impl::_S_max); __semaphore_impl _M_sem; public: explicit counting_semaphore(ptrdiff_t __desired) noexcept : _M_sem(__desired) { } ~counting_semaphore() = default; counting_semaphore(const counting_semaphore&) = delete; counting_semaphore& operator=(const counting_semaphore&) = delete; static constexpr ptrdiff_t max() noexcept { return __least_max_value; } void release(ptrdiff_t __update = 1) noexcept(noexcept(_M_sem._M_release(1))) { _M_sem._M_release(__update); } void acquire() noexcept(noexcept(_M_sem._M_acquire())) { _M_sem._M_acquire(); } bool try_acquire() noexcept(noexcept(_M_sem._M_try_acquire())) { return _M_sem._M_try_acquire(); } template bool try_acquire_for(const std::chrono::duration<_Rep, _Period>& __rtime) { return _M_sem._M_try_acquire_for(__rtime); } template bool try_acquire_until(const std::chrono::time_point<_Clock, _Dur>& __atime) { return _M_sem._M_try_acquire_until(__atime); } }; using binary_semaphore = std::counting_semaphore<1>; _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif // cpp_lib_atomic_wait || _GLIBCXX_HAVE_POSIX_SEMAPHORE #endif // C++20 #endif // _GLIBCXX_SEMAPHORE