Minor refactorings
This commit is contained in:
parent
15f6ae40ac
commit
dfd1689daa
1 changed files with 6 additions and 6 deletions
|
@ -39,7 +39,7 @@ UDPC::LockObj<false> UDPC::SharedSpinLock::try_spin_read_lock() {
|
||||||
++read;
|
++read;
|
||||||
return LockObj<false>(selfWeakPtr, Badge{});
|
return LockObj<false>(selfWeakPtr, Badge{});
|
||||||
}
|
}
|
||||||
return LockObj<false>(Badge{});
|
return LockObj<false>{};
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPC::SharedSpinLock::read_unlock(UDPC::Badge &&badge) {
|
void UDPC::SharedSpinLock::read_unlock(UDPC::Badge &&badge) {
|
||||||
|
@ -68,7 +68,7 @@ UDPC::LockObj<true> UDPC::SharedSpinLock::try_spin_write_lock() {
|
||||||
write = true;
|
write = true;
|
||||||
return LockObj<true>(selfWeakPtr, Badge{});
|
return LockObj<true>(selfWeakPtr, Badge{});
|
||||||
}
|
}
|
||||||
return LockObj<true>(Badge{});
|
return LockObj<true>{};
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPC::SharedSpinLock::write_unlock(UDPC::Badge &&badge) {
|
void UDPC::SharedSpinLock::write_unlock(UDPC::Badge &&badge) {
|
||||||
|
@ -92,7 +92,7 @@ UDPC::LockObj<false> UDPC::SharedSpinLock::trade_write_for_read_lock(UDPC::LockO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return LockObj<false>(Badge{});
|
return LockObj<false>{};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ UDPC::LockObj<false> UDPC::SharedSpinLock::try_trade_write_for_read_lock(UDPC::L
|
||||||
return LockObj<false>(selfWeakPtr, Badge{});
|
return LockObj<false>(selfWeakPtr, Badge{});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return LockObj<false>(Badge{});
|
return LockObj<false>{};
|
||||||
}
|
}
|
||||||
|
|
||||||
UDPC::LockObj<true> UDPC::SharedSpinLock::trade_read_for_write_lock(UDPC::LockObj<false> &lockObj) {
|
UDPC::LockObj<true> UDPC::SharedSpinLock::trade_read_for_write_lock(UDPC::LockObj<false> &lockObj) {
|
||||||
|
@ -123,7 +123,7 @@ UDPC::LockObj<true> UDPC::SharedSpinLock::trade_read_for_write_lock(UDPC::LockOb
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return LockObj<true>(Badge{});
|
return LockObj<true>{};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,5 +138,5 @@ UDPC::LockObj<true> UDPC::SharedSpinLock::try_trade_read_for_write_lock(UDPC::Lo
|
||||||
return LockObj<true>(selfWeakPtr, Badge{});
|
return LockObj<true>(selfWeakPtr, Badge{});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return LockObj<true>(Badge{});
|
return LockObj<true>{};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue