roo_threads
API Documentation for roo_threads
Loading...
Searching...
No Matches
semaphore.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
roo_threads/impl/resolve.h
"
4
5
#ifdef ROO_THREADS_USE_CPPSTD
6
7
#include <semaphore>
8
9
namespace
roo_threads
{
10
/// @brief Backend namespace using C++ standard library synchronization primitives.
11
namespace
cppstd {
12
13
/// @ingroup roo_threads_api_semaphore
14
/// @brief C++ standard library backend implementation of
15
/// `roo::counting_semaphore`.
16
/// @copydoc roo_threads::doc::counting_semaphore
17
template <ptrdiff_t LeastMaxValue = std::counting_semaphore<>::max()>
18
using
counting_semaphore = std::counting_semaphore<LeastMaxValue>;
19
20
/// @ingroup roo_threads_api_semaphore
21
/// @brief C++ standard library backend implementation of
22
/// `roo::binary_semaphore`.
23
/// @copydoc roo_threads::doc::binary_semaphore
24
using
binary_semaphore
= std::binary_semaphore;
25
26
}
// namespace cppstd
27
}
// namespace roo_threads
28
29
#endif
// ROO_THREADS_USE_CPPSTD
roo_threads::doc::binary_semaphore
counting_semaphore< 1 > binary_semaphore
Semaphore with maximum count of one.
Definition
semaphore_api.h:44
roo_threads
Definition
condition_variable_api.h:6
resolve.h
temp_repos
roo_threads
src
roo_threads
impl
cppstd
semaphore.h
Generated by
1.9.8