Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3047b44

Browse files
committed
Clean up comments.
1 parentd8ba3df commit3047b44

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

‎src/include/storage/buf_internals.h

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
/*-------------------------------------------------------------------------
22
*
33
* buf_internals.h
4-
* Internal definitions.
4+
* Internal definitions for buffer manager.
55
*
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: buf_internals.h,v 1.33 1999/09/24 00:25:27 tgl Exp $
10-
*
11-
* NOTE
12-
*If BUFFERPAGE0 is defined, then 0 will be used as a
13-
*valid buffer page number.
9+
* $Id: buf_internals.h,v 1.34 1999/11/21 19:56:12 tgl Exp $
1410
*
1511
*-------------------------------------------------------------------------
1612
*/
@@ -42,18 +38,14 @@ extern intNum_Descriptors;
4238

4339
typedefbits16BufFlags;
4440

45-
typedefstructsbufdescBufferDesc;
46-
typedefstructsbufdescBufferHdr;
47-
typedefstructbuftagBufferTag;
48-
4941
/* long * so alignment will be correct */
5042
typedeflong**BufferBlock;
5143

52-
structbuftag
44+
typedefstructbuftag
5345
{
5446
LockRelIdrelId;
5547
BlockNumberblockNum;/* blknum relative to begin of reln */
56-
};
48+
}BufferTag;
5749

5850
#defineCLEAR_BUFFERTAG(a) \
5951
( \
@@ -72,8 +64,8 @@ struct buftag
7264
#defineINVALID_DESCRIPTOR (-3)
7365

7466
/*
75-
*struct sbufdesc -- shared buffer cache metadata for a single
76-
* shared buffer descriptor.
67+
*BufferDesc -- shared buffer cache metadata for a single
68+
* shared buffer descriptor.
7769
*
7870
*We keep the name of the database and relation in which this
7971
*buffer appears in order to avoid a catalog lookup on cache
@@ -83,17 +75,17 @@ struct buftag
8375
*Dbname, relname, dbid, and relid are enough to determine where
8476
*to put the buffer, for all storage managers.
8577
*/
86-
structsbufdesc
78+
typedefstructsbufdesc
8779
{
88-
BufferfreeNext;/*link for freelist chain */
80+
BufferfreeNext;/*links for freelist chain */
8981
BufferfreePrev;
9082
SHMEM_OFFSETdata;/* pointer to data in buf pool */
9183

9284
/* tag and id must be together for table lookup to work */
9385
BufferTagtag;/* file/block identifier */
9486
intbuf_id;/* maps global desc to local desc */
9587

96-
BufFlagsflags;/*described below */
88+
BufFlagsflags;/*see bit definitions above */
9789
unsignedrefcount;/* # of times buffer is pinned */
9890

9991
#ifdefHAS_TEST_AND_SET
@@ -107,10 +99,12 @@ struct sbufdesc
10799

108100
charsb_dbname[NAMEDATALEN];/* name of db in which buf belongs */
109101
charsb_relname[NAMEDATALEN];/* name of reln */
110-
};
102+
}BufferDesc;
111103

112104
/*
113-
* Buffer lock infos in BufferLocks below.
105+
* Each backend has its own BufferLocks[] array holding flag bits
106+
* showing what locks it has set on each buffer.
107+
*
114108
* We have to free these locks in elog(ERROR)...
115109
*/
116110
#defineBL_IO_IN_PROGRESS(1 << 0)/* unimplemented */
@@ -178,7 +172,7 @@ extern BufferDesc *LocalBufferDescriptors;
178172
externintNLocBuffer;
179173

180174
externBufferDesc*LocalBufferAlloc(Relationreln,BlockNumberblockNum,
181-
bool*foundPtr);
175+
bool*foundPtr);
182176
externintWriteLocalBuffer(Bufferbuffer,boolrelease);
183177
externintFlushLocalBuffer(Bufferbuffer,boolrelease);
184178
externvoidInitLocalBuffer(void);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp