Commit 69b52db2 authored by Nathan Bronson's avatar Nathan Bronson Committed by Facebook Github Bot

namespace macro in SanitizeThread.cpp

Summary:
Macro name should not use a name that might also be used
outside folly.

Reviewed By: yfeldblum

Differential Revision: D12901055

fbshipit-source-id: a18bc33fdaabb339aa7539da12b5a82b95e282a7
parent 838f86a2
...@@ -47,9 +47,9 @@ void do_nothing(...) {} ...@@ -47,9 +47,9 @@ void do_nothing(...) {}
} // namespace } // namespace
#if _MSC_VER #if _MSC_VER
#define CALL_HOOK(name, ...) do_nothing(__VA_ARGS__) #define FOLLY_SANITIZE_THREAD_CALL_HOOK(name, ...) do_nothing(__VA_ARGS__)
#else #else
#define CALL_HOOK(name, ...) name(__VA_ARGS__) #define FOLLY_SANITIZE_THREAD_CALL_HOOK(name, ...) name(__VA_ARGS__)
#endif #endif
namespace folly { namespace folly {
...@@ -60,7 +60,7 @@ void annotate_rwlock_create_impl( ...@@ -60,7 +60,7 @@ void annotate_rwlock_create_impl(
char const* const f, char const* const f,
int const l) { int const l) {
if (kIsSanitizeThread) { if (kIsSanitizeThread) {
CALL_HOOK(AnnotateRWLockCreate, f, l, addr); FOLLY_SANITIZE_THREAD_CALL_HOOK(AnnotateRWLockCreate, f, l, addr);
} }
} }
...@@ -69,7 +69,7 @@ void annotate_rwlock_create_static_impl( ...@@ -69,7 +69,7 @@ void annotate_rwlock_create_static_impl(
char const* const f, char const* const f,
int const l) { int const l) {
if (kIsSanitizeThread) { if (kIsSanitizeThread) {
CALL_HOOK(AnnotateRWLockCreateStatic, f, l, addr); FOLLY_SANITIZE_THREAD_CALL_HOOK(AnnotateRWLockCreateStatic, f, l, addr);
} }
} }
...@@ -78,7 +78,7 @@ void annotate_rwlock_destroy_impl( ...@@ -78,7 +78,7 @@ void annotate_rwlock_destroy_impl(
char const* const f, char const* const f,
int const l) { int const l) {
if (kIsSanitizeThread) { if (kIsSanitizeThread) {
CALL_HOOK(AnnotateRWLockDestroy, f, l, addr); FOLLY_SANITIZE_THREAD_CALL_HOOK(AnnotateRWLockDestroy, f, l, addr);
} }
} }
...@@ -88,7 +88,8 @@ void annotate_rwlock_acquired_impl( ...@@ -88,7 +88,8 @@ void annotate_rwlock_acquired_impl(
char const* const f, char const* const f,
int const l) { int const l) {
if (kIsSanitizeThread) { if (kIsSanitizeThread) {
CALL_HOOK(AnnotateRWLockAcquired, f, l, addr, static_cast<long>(w)); FOLLY_SANITIZE_THREAD_CALL_HOOK(
AnnotateRWLockAcquired, f, l, addr, static_cast<long>(w));
} }
} }
...@@ -109,7 +110,8 @@ void annotate_rwlock_released_impl( ...@@ -109,7 +110,8 @@ void annotate_rwlock_released_impl(
char const* const f, char const* const f,
int const l) { int const l) {
if (kIsSanitizeThread) { if (kIsSanitizeThread) {
CALL_HOOK(AnnotateRWLockReleased, f, l, addr, static_cast<long>(w)); FOLLY_SANITIZE_THREAD_CALL_HOOK(
AnnotateRWLockReleased, f, l, addr, static_cast<long>(w));
} }
} }
...@@ -120,7 +122,8 @@ void annotate_benign_race_sized_impl( ...@@ -120,7 +122,8 @@ void annotate_benign_race_sized_impl(
const char* f, const char* f,
int l) { int l) {
if (kIsSanitizeThread) { if (kIsSanitizeThread) {
CALL_HOOK(AnnotateBenignRaceSized, f, l, addr, size, desc); FOLLY_SANITIZE_THREAD_CALL_HOOK(
AnnotateBenignRaceSized, f, l, addr, size, desc);
} }
} }
} // namespace detail } // namespace detail
......
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