openbsd-ports/databases/postgresql/patches/patch-src_include_storage_s_lock_h
jeremy 105ddce147 Update to PostgreSQL 15.1
Bulk testing and help tb@

OK tb@
2022-11-16 02:59:22 +00:00

34 lines
686 B
Plaintext

Index: src/include/storage/s_lock.h
--- src/include/storage/s_lock.h.orig
+++ src/include/storage/s_lock.h
@@ -802,6 +802,29 @@ tas(volatile slock_t *lock)
do { __asm__ __volatile__("" : : : "memory"); *(lock) = 0; } while (0)
#endif
+#if defined(__m88k__) /* Motorola 88k */
+#define HAS_TEST_AND_SET
+
+typedef unsigned int slock_t;
+
+#define TAS(lock) tas(lock)
+
+static __inline__ int
+tas(volatile slock_t *lock)
+{
+ register slock_t _res = 1;
+
+ __asm__ __volatile__(
+ " xmem %0, %2, %%r0\n"
+: "=r"(_res)
+: "0" (_res), "r"(lock)
+: "memory");
+ return (int) _res;
+}
+
+#endif /* __m88k__ */
+
+
#endif /* defined(__GNUC__) || defined(__INTEL_COMPILER) */