gem5  v20.1.0.0
Public Member Functions | Private Attributes | List of all members
Barrier Class Reference

#include <barrier.hh>

Public Member Functions

 Barrier (unsigned _numWaiting)
 
bool wait ()
 

Private Attributes

std::mutex bMutex
 Mutex to protect access to numLeft and generation. More...
 
std::condition_variable bCond
 Condition variable for waiting on barrier. More...
 
unsigned numWaiting
 Number of threads we should be waiting for before completing the barrier. More...
 
unsigned generation
 Generation of this barrier. More...
 
unsigned numLeft
 Number of threads remaining for the current generation. More...
 

Detailed Description

Definition at line 43 of file barrier.hh.

Constructor & Destructor Documentation

◆ Barrier()

Barrier::Barrier ( unsigned  _numWaiting)
inline

Definition at line 58 of file barrier.hh.

Member Function Documentation

◆ wait()

bool Barrier::wait ( )
inline

Member Data Documentation

◆ bCond

std::condition_variable Barrier::bCond
private

Condition variable for waiting on barrier.

Definition at line 49 of file barrier.hh.

Referenced by wait().

◆ bMutex

std::mutex Barrier::bMutex
private

Mutex to protect access to numLeft and generation.

Definition at line 47 of file barrier.hh.

Referenced by wait().

◆ generation

unsigned Barrier::generation
private

Generation of this barrier.

Definition at line 53 of file barrier.hh.

Referenced by wait().

◆ numLeft

unsigned Barrier::numLeft
private

Number of threads remaining for the current generation.

Definition at line 55 of file barrier.hh.

Referenced by wait().

◆ numWaiting

unsigned Barrier::numWaiting
private

Number of threads we should be waiting for before completing the barrier.

Definition at line 51 of file barrier.hh.

Referenced by wait().


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

Generated on Wed Sep 30 2020 14:02:21 for gem5 by doxygen 1.8.17