diff options
author | dimanne <dimanne@yandex-team.ru> | 2022-02-10 16:49:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:48 +0300 |
commit | 93d66104be406c5b8cdfce7be5546d72d83b547e (patch) | |
tree | 5b4284b97105f480aa2b1ffc564e8f8e5b689df9 /util/system | |
parent | b3eef5b52437f05851a3e8fb489a68db0132657b (diff) | |
download | ydb-93d66104be406c5b8cdfce7be5546d72d83b547e.tar.gz |
Restoring authorship annotation for <dimanne@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system')
-rw-r--r-- | util/system/atomic_ops.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/system/atomic_ops.h b/util/system/atomic_ops.h index 76766b4a0a..6ee569cb68 100644 --- a/util/system/atomic_ops.h +++ b/util/system/atomic_ops.h @@ -131,10 +131,10 @@ inline void AtomicSet(T* volatile& target, T* value) { AtomicSet(*AsAtomicPtr(&target), reinterpret_cast<TAtomicBase>(value)); } -using TNullPtr = decltype(nullptr); - +using TNullPtr = decltype(nullptr); + template <typename T> -inline void AtomicSet(T* volatile& target, TNullPtr) { +inline void AtomicSet(T* volatile& target, TNullPtr) { AtomicSet(*AsAtomicPtr(&target), 0); } @@ -144,7 +144,7 @@ inline T* AtomicSwap(T* volatile* target, T* exchange) { } template <typename T> -inline T* AtomicSwap(T* volatile* target, TNullPtr) { +inline T* AtomicSwap(T* volatile* target, TNullPtr) { return reinterpret_cast<T*>(AtomicSwap(AsAtomicPtr(target), 0)); } @@ -159,7 +159,7 @@ inline T* AtomicGetAndCas(T* volatile* target, T* exchange, T* compare) { } template <typename T> -inline bool AtomicCas(T* volatile* target, T* exchange, TNullPtr) { +inline bool AtomicCas(T* volatile* target, T* exchange, TNullPtr) { return AtomicCas(AsAtomicPtr(target), reinterpret_cast<TAtomicBase>(exchange), 0); } @@ -169,7 +169,7 @@ inline T* AtomicGetAndCas(T* volatile* target, T* exchange, TNullPtr) { } template <typename T> -inline bool AtomicCas(T* volatile* target, TNullPtr, T* compare) { +inline bool AtomicCas(T* volatile* target, TNullPtr, T* compare) { return AtomicCas(AsAtomicPtr(target), 0, reinterpret_cast<TAtomicBase>(compare)); } @@ -179,7 +179,7 @@ inline T* AtomicGetAndCas(T* volatile* target, TNullPtr, T* compare) { } template <typename T> -inline bool AtomicCas(T* volatile* target, TNullPtr, TNullPtr) { +inline bool AtomicCas(T* volatile* target, TNullPtr, TNullPtr) { return AtomicCas(AsAtomicPtr(target), 0, 0); } |