summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorbad <bad>1999-05-18 15:52:19 +0000
committerbad <bad>1999-05-18 15:52:19 +0000
commit0fc23bb33a067ead9c2713bcd31b341db7146d20 (patch)
tree4231c1f2b58df86ca5f220bfe12b8775b93f67a4 /databases
parente0eeda33454a63d3d4f607d443176355cef0a2e0 (diff)
downloadpkgsrc-0fc23bb33a067ead9c2713bcd31b341db7146d20.tar.gz
Provide test-and-set primitive on arm32.
From Andrew McMurry <a.mcmurry1@physics.oxford.ac.uk>.
Diffstat (limited to 'databases')
-rw-r--r--databases/postgresql/patches/patch-af46
1 files changed, 46 insertions, 0 deletions
diff --git a/databases/postgresql/patches/patch-af b/databases/postgresql/patches/patch-af
new file mode 100644
index 00000000000..71157f7580c
--- /dev/null
+++ b/databases/postgresql/patches/patch-af
@@ -0,0 +1,46 @@
+$NetBSD: patch-af,v 1.4 1999/05/18 15:52:19 bad Exp $
+
+*** include/storage/s_lock.h Sat Apr 10 19:43:01 1999
+--- include/storage/s_lock.h Wed Apr 7 03:06:53 1999
+***************
+*** 124,129 ****
+--- 124,145 ----
+
+
+
++ #if defined(__arm32__)
++ #define TAS(lock) tas(lock)
++
++ static __inline__ int
++ tas(volatile slock_t *lock)
++ {
++ register slock_t _res = 1;
++
++ __asm__("swpb %0, %0, [%3]": "=r"(_res), "=m"(*lock):"0"(_res), "r" (lock));
++ return (int) _res;
++ }
++
++ #endif /* __arm32__ */
++
++
++
+ #if defined(sparc)
+ #define TAS(lock) tas(lock)
+
+*** include/port/bsd.h Sat Apr 10 19:43:01 1999
+--- include/port/bsd.h Wed Apr 7 03:31:22 1999
+***************
+*** 24,29 ****
+--- 24,33 ----
+ #define HAS_TEST_AND_SET
+ #endif
+
++ #if defined(__arm32__)
++ #define HAS_TEST_AND_SET
++ #endif
++
+ #if defined(__powerpc__)
+ #define HAS_TEST_AND_SET
+ typedef unsigned int slock_t;
+
+