pros::rtos::Mutex class

Constructors, destructors, conversion operators

Mutex()
Mutex(const Mutex&) deleted
Mutex(Mutex&&) deleted

Public functions

Mutex& operator=(const Mutex&) deleted
Mutex& operator=(Mutex&&) deleted
bool take()
Takes and locks a mutex indefinetly.
bool take(std::uint32_t timeout)
Takes and locks a mutex, waiting for up to a certain number of milliseconds before timing out.
bool give()
Unlocks a mutex.
void lock()
Takes and locks a mutex, waiting for up to TIMEOUT_MAX milliseconds.
void unlock()
Unlocks a mutex.
bool try_lock()
Try to lock a mutex.
template<typename Rep, typename Period>
bool try_lock_for(const std::chrono::duration<Rep, Period>& rel_time)
Takes and locks a mutex, waiting for a specified duration.
template<typename Duration>
bool try_lock_until(const std::chrono::time_point<Clock, Duration>& abs_time)
Takes and locks a mutex, waiting until a specified time.