From 2be55f5c0576ae2b718fe9ad9dfd4f543ee8cef7 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 15 Jan 2019 11:35:40 +1100 Subject: [PATCH] use smt_pause instead of pause on sparc --- CHANGES | 2 ++ lib/isc/rwlock.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index 15d5b1a1c6..66e168828e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +5135. [port] sparc: Use smt_pause() instead of pause. [GL #816] + 5134. [bug] win32: WSAStartup was not called before getservbyname was called. [GL #590] diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c index 8b3f2b5988..b6b2456cd5 100644 --- a/lib/isc/rwlock.c +++ b/lib/isc/rwlock.c @@ -18,6 +18,10 @@ #include #include +#if defined(sun) && (defined(__sparc) || defined(__sparc__)) +#include /* for smt_pause(3c) */ +#endif + #include #include #include @@ -52,6 +56,8 @@ # define isc_rwlock_pause() __asm__ __volatile__ ("hint @pause") #elif defined(__arm__) # define isc_rwlock_pause() __asm__ __volatile__ ("yield") +#elif defined(sun) && (defined(__sparc) || defined(__sparc__)) +# define isc_rwlock_pause() smt_pause() #elif defined(__sparc) || defined(__sparc__) # define isc_rwlock_pause() __asm__ __volatile__ ("pause") #elif defined(__ppc__) || defined(_ARCH_PPC) || \