diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-12-18 11:40:52 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2018-12-18 11:40:52 -0800 |
commit | bb303513dce4e78d898035b9f7f5ae11b7b452dd (patch) | |
tree | 708cacfd6a93bdfff3fa76e813afe909f3e62fe6 /include/grpc/impl/codegen/port_platform.h | |
parent | 00c9c40004d011f01c72d253a530edb3364992bf (diff) | |
parent | d198607457a6f5d47e8c134277ebfe3706f9476b (diff) |
Merge master
Diffstat (limited to 'include/grpc/impl/codegen/port_platform.h')
-rw-r--r-- | include/grpc/impl/codegen/port_platform.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index b2028a6305..031c0c36ae 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -526,6 +526,15 @@ typedef unsigned __int64 uint64_t; #endif /* GPR_ATTRIBUTE_NO_TSAN (2) */ #endif /* GPR_ATTRIBUTE_NO_TSAN (1) */ +/* GRPC_TSAN_ENABLED will be defined, when compiled with thread sanitizer. */ +#if defined(__SANITIZE_THREAD__) +#define GRPC_TSAN_ENABLED +#elif defined(__has_feature) +#if __has_feature(thread_sanitizer) +#define GRPC_TSAN_ENABLED +#endif +#endif + /* GRPC_ALLOW_EXCEPTIONS should be 0 or 1 if exceptions are allowed or not */ #ifndef GRPC_ALLOW_EXCEPTIONS /* If not already set, set to 1 on Windows (style guide standard) but to |