distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
distortos::internal::SemaphoreTryWaitForFunctor Class Reference

SemaphoreTryWaitForFunctor class is a SemaphoreFunctor which calls Semaphore::tryWaitFor() with bound duration. More...

#include "distortos/internal/synchronization/SemaphoreTryWaitForFunctor.hpp"

Inheritance diagram for distortos::internal::SemaphoreTryWaitForFunctor:
[legend]
Collaboration diagram for distortos::internal::SemaphoreTryWaitForFunctor:
[legend]

Public Member Functions

constexpr SemaphoreTryWaitForFunctor (const TickClock::duration duration)
 SemaphoreTryWaitForFunctor's constructor. More...
 
int operator() (Semaphore &semaphore) const override
 Calls Semaphore::tryWaitFor() with bound duration. More...
 

Private Attributes

const TickClock::duration duration_
 bound duration for Semaphore::tryWaitFor() call More...
 

Detailed Description

SemaphoreTryWaitForFunctor class is a SemaphoreFunctor which calls Semaphore::tryWaitFor() with bound duration.

Constructor & Destructor Documentation

◆ SemaphoreTryWaitForFunctor()

constexpr distortos::internal::SemaphoreTryWaitForFunctor::SemaphoreTryWaitForFunctor ( const TickClock::duration  duration)
inlineexplicit

SemaphoreTryWaitForFunctor's constructor.

Parameters
[in]durationis the bound duration for Semaphore::tryWaitFor() call

Member Function Documentation

◆ operator()()

int distortos::internal::SemaphoreTryWaitForFunctor::operator() ( Semaphore semaphore) const
override

Calls Semaphore::tryWaitFor() with bound duration.

Parameters
[in]semaphoreis a reference to Semaphore object for which Semaphore::tryWaitFor() will be called
Returns
value returned by Semaphore::tryWaitFor()
Here is the call graph for this function:

Member Data Documentation

◆ duration_

const TickClock::duration distortos::internal::SemaphoreTryWaitForFunctor::duration_
private

bound duration for Semaphore::tryWaitFor() call


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