Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_
00020 #define ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_
00021
00022
00023
00024
00025
00026
00027 #ifdef ABSL_INTERNAL_HAVE_TSAN_INTERFACE
00028 #error "ABSL_INTERNAL_HAVE_TSAN_INTERFACE cannot be directly set."
00029 #endif
00030
00031 #if defined(THREAD_SANITIZER) && defined(__has_include)
00032 #if __has_include(<sanitizer/tsan_interface.h>)
00033 #define ABSL_INTERNAL_HAVE_TSAN_INTERFACE 1
00034 #endif
00035 #endif
00036
00037 #ifdef ABSL_INTERNAL_HAVE_TSAN_INTERFACE
00038 #include <sanitizer/tsan_interface.h>
00039
00040 #define ABSL_TSAN_MUTEX_CREATE __tsan_mutex_create
00041 #define ABSL_TSAN_MUTEX_DESTROY __tsan_mutex_destroy
00042 #define ABSL_TSAN_MUTEX_PRE_LOCK __tsan_mutex_pre_lock
00043 #define ABSL_TSAN_MUTEX_POST_LOCK __tsan_mutex_post_lock
00044 #define ABSL_TSAN_MUTEX_PRE_UNLOCK __tsan_mutex_pre_unlock
00045 #define ABSL_TSAN_MUTEX_POST_UNLOCK __tsan_mutex_post_unlock
00046 #define ABSL_TSAN_MUTEX_PRE_SIGNAL __tsan_mutex_pre_signal
00047 #define ABSL_TSAN_MUTEX_POST_SIGNAL __tsan_mutex_post_signal
00048 #define ABSL_TSAN_MUTEX_PRE_DIVERT __tsan_mutex_pre_divert
00049 #define ABSL_TSAN_MUTEX_POST_DIVERT __tsan_mutex_post_divert
00050
00051 #else
00052
00053 #define ABSL_TSAN_MUTEX_CREATE(...)
00054 #define ABSL_TSAN_MUTEX_DESTROY(...)
00055 #define ABSL_TSAN_MUTEX_PRE_LOCK(...)
00056 #define ABSL_TSAN_MUTEX_POST_LOCK(...)
00057 #define ABSL_TSAN_MUTEX_PRE_UNLOCK(...)
00058 #define ABSL_TSAN_MUTEX_POST_UNLOCK(...)
00059 #define ABSL_TSAN_MUTEX_PRE_SIGNAL(...)
00060 #define ABSL_TSAN_MUTEX_POST_SIGNAL(...)
00061 #define ABSL_TSAN_MUTEX_PRE_DIVERT(...)
00062 #define ABSL_TSAN_MUTEX_POST_DIVERT(...)
00063
00064 #endif
00065
00066 #endif // ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_