diff options
author | Pauli <pauli@openssl.org> | 2022-01-12 13:26:38 +1100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2022-01-13 21:46:34 +1100 |
commit | e22cbe5e67461470590e6fb8858c95285fcdea0e (patch) | |
tree | e5e275c29de5391478b8f40c9ffd5215a1b061de /include | |
parent | 1fc97807d3a3b5e3065a7df80d1ad3601ccc5e2f (diff) |
tsan: make detecting the need for locking when using tsan easier
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/17479)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/tsan_assist.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/internal/tsan_assist.h b/include/internal/tsan_assist.h index c67c591e0e..512bfe4be9 100644 --- a/include/internal/tsan_assist.h +++ b/include/internal/tsan_assist.h @@ -125,7 +125,13 @@ #ifndef TSAN_QUALIFIER -# define TSAN_QUALIFIER volatile +# ifdef OPENSSL_THREADS +# define TSAN_QUALIFIER volatile +# define TSAN_REQUIRES_LOCKING +# else /* OPENSSL_THREADS */ +# define TSAN_QUALIFIER +# endif /* OPENSSL_THREADS */ + # define tsan_load(ptr) (*(ptr)) # define tsan_store(ptr, val) (*(ptr) = (val)) # define tsan_add(ptr, n) (*(ptr) += (n)) |