StateOS
Loading...
Searching...
No Matches
stateos::Barrier Struct Reference

create and initialize a barrier object More...

#include <osbarrier.h>

Inheritance diagram for stateos::Barrier:

Public Types

using Ptr = std::unique_ptr<Barrier>
 result type of Create()

Public Member Functions

constexpr Barrier (const unsigned _limit)
 constructor, see the constructor parameters of the class
 Barrier (Barrier &&_src)
 move constructor
 Barrier (const Barrier &)=delete
Barrier & operator= (Barrier &&)=delete
Barrier & operator= (const Barrier &)=delete
void reset ()
 bar_reset()
void kill ()
 bar_kill()
void destroy ()
 bar_destroy()
template<typename T>
int waitFor (const T &_delay)
 bar_waitFor()
template<typename T>
int waitUntil (const T &_time)
 bar_waitUntil()
int wait ()
 bar_wait()

Static Public Member Functions

static Ptr Create (const unsigned _limit)
 create and initialize dynamic object with manageable resources

Detailed Description

create and initialize a barrier object

Constructor parameters
  • limit: number of tasks that must call wait[Until|For] function to release the barrier object

Member Function Documentation

◆ Create()

Ptr stateos::Barrier::Create ( const unsigned _limit)
inlinestatic

create and initialize dynamic object with manageable resources

Parameters
_limitnumber of tasks that must call bar_wait[Until|For] function to release the barrier object
Returns
std::unique_pointer / pointer to Barrier object
Note
use only in thread mode

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