Use out-of-line M68K spinlock code for OpenBSD as well as NetBSD.
authorTom Lane
Mon, 20 Nov 2017 23:05:03 +0000 (18:05 -0500)
committerTom Lane
Mon, 20 Nov 2017 23:05:03 +0000 (18:05 -0500)
David Carlier (from a patch being carried by OpenBSD packagers)

Discussion: https://postgr.es/m/CA+XhMqzwFSGVU7MEnfhCecc8YdP98tigXzzpd0AAdwaGwaVXEA@mail.gmail.com

src/backend/storage/lmgr/s_lock.c

index a82d7679ca2e37b086f44eafa828dd4071208100..b70b2e237bac79eb3dea1bbd2c85d73aaac3d26f 100644 (file)
@@ -223,7 +223,7 @@ static void
 tas_dummy()
 {
    __asm__     __volatile__(
-#if defined(__NetBSD__) && defined(__ELF__)
+#if (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(__ELF__)
 /* no underscore for label and % for registers */
                                         "\
 .global        tas                 \n\
@@ -248,7 +248,7 @@ _tas:                           \n\
 _success:                      \n\
            moveq   #0,d0       \n\
            rts                 \n"
-#endif   /* __NetBSD__ && __ELF__ */
+#endif   /* (__NetBSD__ || __OpenBSD__) && __ELF__ */
    );
 }
 #endif   /* __m68k__ && !__linux__ */