summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1998-02-13 05:10:06 +0000
committerMarc G. Fournier <scrappy@hub.org>1998-02-13 05:10:06 +0000
commit64e7adb07b252ba4b6d6990bf6dad2105e072105 (patch)
treed5942287e79818d0d1bdf31b8167f040b7d7246b /src/include
parente3f222466498260a97b2559d539398bad9e6ccff (diff)
downloadpostgresql-64e7adb07b252ba4b6d6990bf6dad2105e072105.tar.gz
From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
Apart from this Makefile hack, all I've done is to make dynamically loaded code modules fail properly (as was already done for __mips__, although I think this is too loose: I believe NetBSD for the pmax can do dynamic linking), and to add test-and-set lock handling. As Bruce suggested, this is done in a maximally efficient inlined way: I was not aware that this code was so important, speed-wise.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/port/bsd.h5
-rw-r--r--src/include/storage/s_lock.h14
2 files changed, 18 insertions, 1 deletions
diff --git a/src/include/port/bsd.h b/src/include/port/bsd.h
index 12787118ae..f64ea09456 100644
--- a/src/include/port/bsd.h
+++ b/src/include/port/bsd.h
@@ -10,6 +10,11 @@
#define HAS_TEST_AND_SET
#endif
+#if defined(vax)
+#define NEED_VAX_TAS_ASM
+#define HAS_TEST_AND_SET
+#endif
+
#if defined(ns32k)
#define NEED_NS32k_TAS_ASM
#define HAS_TEST_AND_SET
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 68f93a1a04..455329dce0 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.24 1998/02/05 03:31:01 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.25 1998/02/13 05:09:50 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -288,6 +288,18 @@ tas_dummy()
#endif /* NEED_SPARC_TAS_ASM */
/*
+ * VAXen -- even multiprocessor ones
+ */
+
+#if defined(NEED_VAX_TAS_ASM)
+
+#define S_LOCK(addr) __asm__("1: bbssi $0,(%0),1b": :"r"(addr))
+#define S_UNLOCK(addr) (*(addr) = 0)
+#define S_INIT_LOCK(addr) (*(addr) = 0)
+
+#endif /* NEED_VAX_TAS_ASM */
+
+/*
* i386 based things
*/