aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-12-05 19:06:20 -0500
committerGravatar GitHub <noreply@github.com>2018-12-05 19:06:20 -0500
commitd7ce25302a594fb6cd3414d9e76230f4291b91c4 (patch)
treeda47b549af064d5cb2c2f4d5c5b50ebb23c4064d /include
parenteca8e7968c8959ac2a2c5b3b44c94b5d5c984758 (diff)
parentbe8ef52ea8a0bb91a83c41a8028bab69f42daac7 (diff)
Merge pull request #17368 from soheilhy/worktree-tsan-auto-annot
TSAN annotations for grpc_call_combiner
Diffstat (limited to 'include')
-rw-r--r--include/grpc/impl/codegen/port_platform.h9
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