19#include "pw_chrono/system_clock.h"
20#include "pw_preprocessor/util.h"
24#include "pw_sync_backend/counting_semaphore_native.h"
47 using native_handle_type = backend::NativeCountingSemaphoreHandle;
93 chrono::SystemClock::time_point deadline);
96 [[nodiscard]] static constexpr ptrdiff_t
max() noexcept {
97 return backend::kCountingSemaphoreMaxValue;
100 native_handle_type native_handle();
104 backend::NativeCountingSemaphore native_type_;
109#include "pw_sync_backend/counting_semaphore_inline.h"
126bool pw_sync_CountingSemaphore_TryAcquireFor(
129bool pw_sync_CountingSemaphore_TryAcquireUntil(
132ptrdiff_t pw_sync_CountingSemaphore_Max(
void);
Definition: counting_semaphore.h:45
bool try_acquire() noexcept
bool try_acquire_until(chrono::SystemClock::time_point deadline)
static constexpr ptrdiff_t max() noexcept
Returns the internal counter's maximum possible value.
Definition: counting_semaphore.h:96
bool try_acquire_for(chrono::SystemClock::duration timeout)
void release(ptrdiff_t update=1)
Definition: system_clock.h:224
Definition: system_clock.h:228