gem5
|
#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... | |
Definition at line 45 of file barrier.hh.
|
inline |
Definition at line 60 of file barrier.hh.
|
inline |
Definition at line 65 of file barrier.hh.
References bCond, bMutex, generation, X86ISA::lock, numLeft, and numWaiting.
Referenced by BaseGlobalEvent::BarrierEvent::globalBarrier(), simulate(), and thread_loop().
|
private |
Condition variable for waiting on barrier.
Definition at line 51 of file barrier.hh.
Referenced by wait().
|
private |
Mutex to protect access to numLeft and generation.
Definition at line 49 of file barrier.hh.
Referenced by wait().
|
private |
|
private |
Number of threads remaining for the current generation.
Definition at line 57 of file barrier.hh.
Referenced by wait().
|
private |
Number of threads we should be waiting for before completing the barrier.
Definition at line 53 of file barrier.hh.
Referenced by wait().