modm API documentation
modm::fiber::counting_semaphore< LeastMaxValue > Class Template Reference

#include <modm/processing/fiber/semaphore.hpp>

Public Member Functions

constexpr counting_semaphore (std::ptrdiff_t desired)
 
bool try_acquire ()
 
void acquire ()
 
void release ()
 
template<typename Rep , typename Period >
bool try_acquire_for (std::chrono::duration< Rep, Period > sleep_duration)
 
template<class Clock , class Duration >
bool try_acquire_until (std::chrono::time_point< Clock, Duration > sleep_time)
 

Static Public Member Functions

static constexpr std::ptrdiff_t max ()
 

Detailed Description

template<std::ptrdiff_t LeastMaxValue = 255>
class modm::fiber::counting_semaphore< LeastMaxValue >

Implements the std::counting_semaphore interface for fibers.

See also
https://en.cppreference.com/w/cpp/thread/counting_semaphore

Member Function Documentation

template<std::ptrdiff_t LeastMaxValue = 255>
void modm::fiber::counting_semaphore< LeastMaxValue >::release ( )
inline
Note
This function can be called from an interrupt.
template<std::ptrdiff_t LeastMaxValue = 255>
bool modm::fiber::counting_semaphore< LeastMaxValue >::try_acquire ( )
nodiscardinline
Note
This function can be called from an interrupt.

The documentation for this class was generated from the following file: