diff options
author | Richard Levitte <levitte@openssl.org> | 2023-03-06 08:55:34 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2023-03-06 12:18:43 +0100 |
commit | ac21c1780a63a8d9a3a6217eb52fe0d188fa7655 (patch) | |
tree | 7919c0de6e6404f338009e8a50f94811b9dd37eb /crypto | |
parent | 52ce351a674bf459c836ffd01afb09917889f047 (diff) |
VMS knows POSIX threads too!
include/internal/thread_arch.h didn't indicate this, now it does.
This also removes ossl_crypto_mem_barrier(), because we isn't used
anywhere, and doesn't build with compilers that don't support the GNU
extension __asm__.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/20440)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/thread/arch/thread_posix.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/crypto/thread/arch/thread_posix.c b/crypto/thread/arch/thread_posix.c index b18f997b94..b157435fd6 100644 --- a/crypto/thread/arch/thread_posix.c +++ b/crypto/thread/arch/thread_posix.c @@ -193,40 +193,4 @@ void ossl_crypto_condvar_free(CRYPTO_CONDVAR **cv) *cv_p = NULL; } -void ossl_crypto_mem_barrier(void) -{ -# if defined(__clang__) || defined(__GNUC__) - __sync_synchronize(); -# elif !defined(OPENSSL_NO_ASM) -# if defined(__alpha__) /* Alpha */ - __asm__ volatile("mb" : : : "memory"); -# elif defined(__amd64__) || defined(__i386__) || defined(__i486__) \ - || defined(__i586__) || defined(__i686__) || defined(__i386) /* x86 */ - __asm__ volatile("mfence" : : : "memory"); -# elif defined(__arm__) || defined(__aarch64__) /* ARMv7, ARMv8 */ - __asm__ volatile("dmb ish" : : : "memory"); -# elif defined(__hppa__) /* PARISC */ - __asm__ volatile("" : : : "memory"); -# elif defined(__mips__) /* MIPS */ - __asm__ volatile("sync" : : : "memory"); -# elif defined(__powerpc__) || defined(__powerpc64__) /* power, ppc64, ppc64le */ - __asm__ volatile("sync" : : : "memory"); -# elif defined(__sparc__) - __asm__ volatile("ba,pt %%xcc, 1f\n\t" \ - " membar #Sync\n" \ - "1:\n" \ - : : : "memory"); -# elif defined(__s390__) || defined(__s390x__) /* z */ - __asm__ volatile("bcr 15,0" : : : "memory"); -# elif defined(__riscv) || defined(__riscv__) /* riscv */ - __asm__ volatile("fence iorw,iorw" : : : "memory"); -# else /* others, compiler only */ - __asm__ volatile("" : : : "memory"); -# endif -# else - /* compiler only barrier */ - __asm__ volatile("" : : : "memory"); -# endif -} - #endif |