From 64b49cf833cb32b064f44c737c5ff586a2775f85 Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Thu, 17 Oct 2013 10:41:33 +0200 Subject: [PATCH] postgresql-aarch64-atomic-upgrade.patch is not used --- postgresql-aarch64-atomic-upgrade.patch | 42 ------------------------- 1 file changed, 42 deletions(-) delete mode 100644 postgresql-aarch64-atomic-upgrade.patch diff --git a/postgresql-aarch64-atomic-upgrade.patch b/postgresql-aarch64-atomic-upgrade.patch deleted file mode 100644 index 7bb5b0e..0000000 --- a/postgresql-aarch64-atomic-upgrade.patch +++ /dev/null @@ -1,42 +0,0 @@ -Add support for atomic operations TAS/S_UNLOCK in aarch64 - -This was already added to upstream 9.3.0+ version but we need to add this into -pre-upgrade postgresql version (until we are not upgrading also from 9.3.0+). - -~> upstream (612ecf311b) -~> #970661 - -diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h -index d4a783f..29124b1 100644 ---- a/src/include/storage/s_lock.h -+++ b/src/include/storage/s_lock.h -@@ -335,6 +335,29 @@ tas(volatile slock_t *lock) - #endif /* __arm__ */ - - -+/* -+ * On ARM64, we use __sync_lock_test_and_set(int *, int) if available. -+ */ -+#if defined(__aarch64__) || defined(__aarch64) -+#ifdef HAVE_GCC_INT_ATOMICS -+#define HAS_TEST_AND_SET -+ -+#define TAS(lock) tas(lock) -+ -+typedef int slock_t; -+ -+static __inline__ int -+tas(volatile slock_t *lock) -+{ -+ return __sync_lock_test_and_set(lock, 1); -+} -+ -+#define S_UNLOCK(lock) __sync_lock_release(lock) -+ -+#endif /* HAVE_GCC_INT_ATOMICS */ -+#endif /* __aarch64__ */ -+ -+ - /* S/390 and S/390x Linux (32- and 64-bit zSeries) */ - #if defined(__s390__) || defined(__s390x__) - #define HAS_TEST_AND_SET