summaryrefslogtreecommitdiff
path: root/src/include/storage/bufmgr.h
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2003-12-14 00:34:47 +0000
committerNeil Conway <neilc@samurai.com>2003-12-14 00:34:47 +0000
commitfef0c8345a96f953ebfe59fcc22a9eeb980b25c5 (patch)
tree853c777b605251bd9143a855d21cd12e62c9be06 /src/include/storage/bufmgr.h
parent81e9455150bcb1ebc5774c7c4fd4d5ed6ba8ac1b (diff)
I posted some bufmgr cleanup a few weeks ago, but it conflicted with
some concurrent changes Jan was making to the bufmgr. Here's an updated version of the patch -- it should apply cleanly to CVS HEAD and passes the regression tests. This patch makes the following changes: - remove the UnlockAndReleaseBuffer() and UnlockAndWriteBuffer() macros, and replace uses of them with calls to the appropriate functions. - remove a bunch of #ifdef BMTRACE code: it is ugly & broken (i.e. it doesn't compile) - make BufferReplace() return a bool, not an int - cleanup some logic in bufmgr.c; should be functionality equivalent to the previous code, just cleaner now - remove the BM_PRIVATE flag as it is unused - improve a few comments, etc.
Diffstat (limited to 'src/include/storage/bufmgr.h')
-rw-r--r--src/include/storage/bufmgr.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index c4ac75262cf..7f955ceef3a 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.72 2003/11/29 22:41:13 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.73 2003/12/14 00:34:47 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,19 +57,6 @@ extern long *LocalRefCount;
*/
#define BAD_BUFFER_ID(bid) ((bid) < 1 || (bid) > NBuffers)
-#define INVALID_DESCRIPTOR (-3)
-
-#define UnlockAndReleaseBuffer(buffer) \
-( \
- LockBuffer(buffer, BUFFER_LOCK_UNLOCK), \
- ReleaseBuffer(buffer) \
-)
-
-#define UnlockAndWriteBuffer(buffer) \
-( \
- LockBuffer(buffer, BUFFER_LOCK_UNLOCK), \
- WriteBuffer(buffer) \
-)
/*
* BufferIsValid