Commit 071b632b authored by Pranjal Raihan's avatar Pranjal Raihan Committed by Facebook GitHub Bot

Use FOLLY_DISABLE_SANITIZERS in MicroLock

Reviewed By: yfeldblum

Differential Revision: D32364716

fbshipit-source-id: f36356d5818adebe5bbbe219044c81282ab008a6
parent 92c5f79b
......@@ -155,14 +155,14 @@ class MicroLockCore {
}
template <typename Func>
FOLLY_DISABLE_ADDRESS_SANITIZER FOLLY_DISABLE_MEMORY_SANITIZER void
unlockAndStoreWithModifier(Func modifier) noexcept;
FOLLY_DISABLE_SANITIZERS void unlockAndStoreWithModifier(
Func modifier) noexcept;
public:
/**
* Loads the data stored in the unused bits of the lock atomically.
*/
FOLLY_DISABLE_ADDRESS_SANITIZER FOLLY_DISABLE_MEMORY_SANITIZER uint8_t
FOLLY_DISABLE_SANITIZERS uint8_t
load(std::memory_order order = std::memory_order_seq_cst) const noexcept {
return decodeDataFromWord(word()->load(order));
}
......@@ -172,7 +172,7 @@ class MicroLockCore {
* used by the lock, the most significant 2 bits of the provided value will be
* ignored.
*/
FOLLY_DISABLE_ADDRESS_SANITIZER FOLLY_DISABLE_MEMORY_SANITIZER void store(
FOLLY_DISABLE_SANITIZERS void store(
uint8_t value,
std::memory_order order = std::memory_order_seq_cst) noexcept;
......@@ -260,11 +260,9 @@ class MicroLockBase : public MicroLockCore {
* data, in which case reading and locking should be done in one atomic
* operation.
*/
FOLLY_DISABLE_ADDRESS_SANITIZER FOLLY_DISABLE_MEMORY_SANITIZER uint8_t
lockAndLoad() noexcept;
FOLLY_DISABLE_SANITIZERS uint8_t lockAndLoad() noexcept;
void lock() noexcept { lockAndLoad(); }
FOLLY_DISABLE_ADDRESS_SANITIZER FOLLY_DISABLE_MEMORY_SANITIZER bool
try_lock() noexcept;
FOLLY_DISABLE_SANITIZERS bool try_lock() noexcept;
/**
* A lock guard which allows reading and writing to the unused bits of the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment