18#include "pw_chrono/system_clock.h"
19#include "pw_preprocessor/util.h"
20#include "pw_sync/lock_annotations.h"
21#include "pw_sync/mutex.h"
25#include "pw_sync/virtual_basic_lockable.h"
77 return impl().try_lock_for(timeout);
80 [[nodiscard]]
bool try_lock_until(chrono::SystemClock::time_point deadline)
82 return impl().try_lock_until(deadline);
90#include "pw_sync_backend/timed_mutex_inline.h"
Definition: virtual_basic_lockable.h:109
Definition: timed_mutex.h:42
bool try_lock_for(chrono::SystemClock::duration timeout)
bool try_lock_until(chrono::SystemClock::time_point deadline)
Definition: timed_mutex.h:71
std::chrono::duration< rep, period > duration
Alias for durations representable with this clock.
Definition: system_clock.h:90
#define PW_LOCKABLE(name)
Definition: lock_annotations.h:208
void pw_sync_TimedMutex_Lock(pw_sync_TimedMutex *mutex)
Invokes the TimedMutex::lock member function on the given mutex.
#define PW_EXCLUSIVE_TRYLOCK_FUNCTION(...)
Definition: lock_annotations.h:260
#define PW_NO_LOCK_SAFETY_ANALYSIS
Definition: lock_annotations.h:292
bool pw_sync_TimedMutex_TryLockUntil(pw_sync_TimedMutex *mutex, pw_chrono_SystemClock_TimePoint deadline)
bool pw_sync_TimedMutex_TryLock(pw_sync_TimedMutex *mutex)
Invokes the TimedMutex::try_lock member function on the given mutex.
bool pw_sync_TimedMutex_TryLockFor(pw_sync_TimedMutex *mutex, pw_chrono_SystemClock_Duration timeout)
Invokes the TimedMutex::try_lock_for member function on the given mutex.
void pw_sync_TimedMutex_Unlock(pw_sync_TimedMutex *mutex)
Invokes the TimedMutex::unlock member function on the given mutex.
Definition: binary_semaphore.h:26
Definition: system_clock.h:228
Definition: system_clock.h:232