forked from OSchip/llvm-project
parent
b8a5f99bee
commit
041eaf976c
|
@ -331,11 +331,11 @@ static inline bool BothReads(Shadow s, int kAccessIsWrite) {
|
|||
return !kAccessIsWrite && !s.is_write();
|
||||
}
|
||||
|
||||
static inline bool OldIsRWStronger(Shadow old, int kAccessIsWrite) {
|
||||
static inline bool OldIsRWNotWeaker(Shadow old, int kAccessIsWrite) {
|
||||
return old.is_write() || !kAccessIsWrite;
|
||||
}
|
||||
|
||||
static inline bool OldIsRWWeaker(Shadow old, int kAccessIsWrite) {
|
||||
static inline bool OldIsRWWeakerOrEqual(Shadow old, int kAccessIsWrite) {
|
||||
return !old.is_write() || kAccessIsWrite;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ do {
|
|||
if (Shadow::TidsAreEqual(old, cur)) {
|
||||
StatInc(thr, StatShadowSameThread);
|
||||
if (OldIsInSameSynchEpoch(old, thr)) {
|
||||
if (OldIsRWStronger(old, kAccessIsWrite)) {
|
||||
if (OldIsRWNotWeaker(old, kAccessIsWrite)) {
|
||||
// found a slot that holds effectively the same info
|
||||
// (that is, same tid, same sync epoch and same size)
|
||||
StatInc(thr, StatMopSame);
|
||||
|
@ -43,7 +43,7 @@ do {
|
|||
StoreIfNotYetStored(sp, &store_word);
|
||||
break;
|
||||
}
|
||||
if (OldIsRWWeaker(old, kAccessIsWrite))
|
||||
if (OldIsRWWeakerOrEqual(old, kAccessIsWrite))
|
||||
StoreIfNotYetStored(sp, &store_word);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue