aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buf.h
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1996-07-09 06:22:35 +0000
committerMarc G. Fournier <scrappy@hub.org>1996-07-09 06:22:35 +0000
commitd31084e9d1118b25fd16580d9d8c2924b5740dff (patch)
tree3179e66307d54df9c7b966543550e601eb55e668 /src/backend/storage/buf.h
downloadpostgresql-PG95-1_01.tar.gz
postgresql-PG95-1_01.zip
Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01
Diffstat (limited to 'src/backend/storage/buf.h')
-rw-r--r--src/backend/storage/buf.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/backend/storage/buf.h b/src/backend/storage/buf.h
new file mode 100644
index 00000000000..73582e8a61c
--- /dev/null
+++ b/src/backend/storage/buf.h
@@ -0,0 +1,47 @@
+/*-------------------------------------------------------------------------
+ *
+ * buf.h--
+ * Basic buffer manager data types.
+ *
+ *
+ * Copyright (c) 1994, Regents of the University of California
+ *
+ * $Id: buf.h,v 1.1.1.1 1996/07/09 06:21:52 scrappy Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef BUF_H
+#define BUF_H
+
+#define InvalidBuffer (0)
+#define UnknownBuffer (-99999)
+
+typedef long Buffer;
+
+/*
+ * BufferIsInvalid --
+ * True iff the buffer is invalid.
+ */
+#define BufferIsInvalid(buffer) ((buffer) == InvalidBuffer)
+
+/*
+ * BufferIsUnknown --
+ * True iff the buffer is unknown.
+ */
+#define BufferIsUnknown(buffer) ((buffer) == UnknownBuffer)
+
+/*
+ * BufferIsLocal --
+ * True iff the buffer is local (not visible to other servers).
+ */
+#define BufferIsLocal(buffer) ((buffer) < 0)
+
+/*
+ * If NO_BUFFERISVALID is defined, all error checking using BufferIsValid()
+ * are suppressed. Decision-making using BufferIsValid is not affected.
+ * This should be set only if one is sure there will be no errors.
+ * - plai 9/10/90
+ */
+#undef NO_BUFFERISVALID
+
+#endif /* BUF_H */