Changeset 95219 in vbox for trunk/src/libs/openssl-3.0.3/crypto/threads_pthread.c
- Timestamp:
- Jun 8, 2022 7:43:44 AM (3 years ago)
- Location:
- trunk/src/libs/openssl-3.0.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.3
- Property svn:mergeinfo
-
old new 14 14 /vendor/openssl/3.0.1:150323-150324 15 15 /vendor/openssl/3.0.2:150728-150729 16 /vendor/openssl/current:147554-150727 16 /vendor/openssl/3.0.3:151497-151729 17 /vendor/openssl/current:147554-151496
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.3/crypto/threads_pthread.c
r94404 r95219 16 16 #if defined(__sun) 17 17 # include <atomic.h> 18 #endif 19 20 #if defined(__apple_build_version__) && __apple_build_version__ < 6000000 21 /* 22 * OS/X 10.7 and 10.8 had a weird version of clang which has __ATOMIC_ACQUIRE and 23 * __ATOMIC_ACQ_REL but which expects only one parameter for __atomic_is_lock_free() 24 * rather than two which has signature __atomic_is_lock_free(sizeof(_Atomic(T))). 25 * All of this makes impossible to use __atomic_is_lock_free here. 26 * 27 * See: https://github.com/llvm/llvm-project/commit/a4c2602b714e6c6edb98164550a5ae829b2de760 28 */ 29 #define BROKEN_CLANG_ATOMICS 18 30 #endif 19 31 … … 189 201 int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock) 190 202 { 191 # if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) 203 # if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS) 192 204 if (__atomic_is_lock_free(sizeof(*val), val)) { 193 205 *ret = __atomic_add_fetch(val, amount, __ATOMIC_ACQ_REL); … … 216 228 CRYPTO_RWLOCK *lock) 217 229 { 218 # if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) 230 # if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS) 219 231 if (__atomic_is_lock_free(sizeof(*val), val)) { 220 232 *ret = __atomic_or_fetch(val, op, __ATOMIC_ACQ_REL); … … 241 253 int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock) 242 254 { 243 # if defined(__GNUC__) && defined(__ATOMIC_ACQUIRE) 255 # if defined(__GNUC__) && defined(__ATOMIC_ACQUIRE) && !defined(BROKEN_CLANG_ATOMICS) 244 256 if (__atomic_is_lock_free(sizeof(*val), val)) { 245 257 __atomic_load(val, ret, __ATOMIC_ACQUIRE);
Note:
See TracChangeset
for help on using the changeset viewer.