20 #ifndef GALOIS_SUBSTRATE_THREAD_RW_LOCK_H
21 #define GALOIS_SUBSTRATE_THREAD_RW_LOCK_H
23 #include "galois/config.h"
44 for (
unsigned i = 0; i < locks.
size(); ++i) {
50 for (
unsigned i = 0; i < locks.
size(); ++i) {
63 template <
typename L,
typename R,
typename W>
80 if (!readAndCheck()) {
84 rwmutex.writeUnlock();
91 #endif // GALOIS_SUBSTRATE_THREAD_RW_LOCK_H
void readLock()
Definition: ThreadRWlock.h:39
void lock() const
Definition: PaddedLock.h:39
void unlock() const
Definition: PaddedLock.h:41
Definition: ThreadRWlock.h:30
T * getLocal()
Definition: PerThreadStorage.h:128
Definition: PaddedLock.h:35
void writeUnlock()
Definition: ThreadRWlock.h:49
unsigned size() const
Definition: PerThreadStorage.h:159
T * getRemote(unsigned int thread)
Definition: PerThreadStorage.h:149
void writeLock()
Definition: ThreadRWlock.h:43
void readUnlock()
Definition: ThreadRWlock.h:41
void readUpdateProtected(L &rwmutex, R &readAndCheck, W &write)
readOrUpdate is a generic function to perform reads or writes using a rwmutex
Definition: ThreadRWlock.h:64