DPsim
|
#include <Scheduler.h>
Public Member Functions | |
Barrier ()=delete | |
Constructor without parameters is forbidden. | |
Barrier (Int limit, Bool useCondition=false) | |
void | wait () |
void | signal () |
A barrier is used to synchronize threads. Threads running into the barrier have to wait until the barrier state is released when a defined number of threads reaches the barrier.
Definition at line 118 of file Scheduler.h.
|
inline |
Limit sets the number of threads that need to reach the barrier to release it.
Definition at line 124 of file Scheduler.h.
|
inline |
Increases the barrier counter like wait does, but does not wait for it to reach the limit (so this does not provide any synchronization with other threads). Can be used to eliminate unnecessary waits if multiple barriers are used in sequence.
Definition at line 165 of file Scheduler.h.
|
inline |
Blocks until |limit| calls have been made, at which point all threads return. Provides synchronization, i.e. all writes from before this call are visible in all threads after this call.
Definition at line 130 of file Scheduler.h.