Support IBM S/390. Patches from Neale [email protected].
authorThomas G. Lockhart
Sun, 3 Dec 2000 14:41:47 +0000 (14:41 +0000)
committerThomas G. Lockhart
Sun, 3 Dec 2000 14:41:47 +0000 (14:41 +0000)
doc/src/sgml/installation.sgml
src/include/storage/s_lock.h

index e0bea34fd8ecfbda83835f8a5f905873318b503f..71d5fb1e03cbad5f3163b4680cbe98c8acacd6c2 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  <![%flattext-install-include[<productname>PostgreSQL</>]]> Installation Instructions
@@ -1160,6 +1160,13 @@ gunzip -c user.ps.gz \
    2000-04-12, Tom Lane ([email protected])
         See also doc/FAQ_HPUX
        
+       
+   IBM
+   S/390
+   7.1
+   2000-11-17, Neale Ferguson ([email protected])
+   
+       
        
    IRIX 6.5.6f
    MIPS
index d50e3564bb7eb0cc9007a13f5b250199883d1eb2..863801f8ee37d3c53658239a4542d75db8c3bf3e 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.74 2000/11/28 23:27:57 tgl Exp $
+ *   $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.75 2000/12/03 14:41:42 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -128,6 +128,29 @@ __asm__("swpb %0, %0, [%3]": "=r"(_res), "=m"(*lock):"0"(_res), "r" (lock));
 
 #endif   /* __arm__ */
 
+#if defined(__s390__)
+/*
+ * S/390 Linux
+ */
+#define TAS(lock)      tas(lock)
+
+static inline int
+tas(volatile slock_t *lock)
+{
+ int _res;
+
+        __asm__ __volatile("    la    1,1\n"
+                           "    l     2,%2\n"
+                           "    slr   0,0\n"
+                           "    cs    0,1,0(2)\n"
+                           "    lr    %1,0"
+                           : "=m" (lock), "=d" (_res)
+                           : "m" (lock)
+                           : "0", "1", "2");
+
+       return (_res);
+}
+#endif  /* __s390__ */
 
 
 #if defined(__sparc__)