PostgreSQL Source Code  git master
logtape.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * logtape.h
4  * Management of "logical tapes" within temporary files.
5  *
6  * See logtape.c for explanations.
7  *
8  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * src/include/utils/logtape.h
12  *
13  *-------------------------------------------------------------------------
14  */
15 
16 #ifndef LOGTAPE_H
17 #define LOGTAPE_H
18 
19 /* LogicalTapeSet is an opaque type whose details are not known outside logtape.c. */
20 
22 
23 /*
24  * prototypes for functions in logtape.c
25  */
26 
27 extern LogicalTapeSet *LogicalTapeSetCreate(int ntapes);
28 extern void LogicalTapeSetClose(LogicalTapeSet *lts);
30 extern size_t LogicalTapeRead(LogicalTapeSet *lts, int tapenum,
31  void *ptr, size_t size);
32 extern void LogicalTapeWrite(LogicalTapeSet *lts, int tapenum,
33  void *ptr, size_t size);
34 extern void LogicalTapeRewindForRead(LogicalTapeSet *lts, int tapenum,
35  size_t buffer_size);
36 extern void LogicalTapeRewindForWrite(LogicalTapeSet *lts, int tapenum);
37 extern void LogicalTapeFreeze(LogicalTapeSet *lts, int tapenum);
38 extern size_t LogicalTapeBackspace(LogicalTapeSet *lts, int tapenum,
39  size_t size);
40 extern void LogicalTapeSeek(LogicalTapeSet *lts, int tapenum,
41  long blocknum, int offset);
42 extern void LogicalTapeTell(LogicalTapeSet *lts, int tapenum,
43  long *blocknum, int *offset);
44 extern long LogicalTapeSetBlocks(LogicalTapeSet *lts);
45 
46 #endif /* LOGTAPE_H */
LogicalTapeSet * LogicalTapeSetCreate(int ntapes)
Definition: logtape.c:379
long LogicalTapeSetBlocks(LogicalTapeSet *lts)
Definition: logtape.c:889
void LogicalTapeWrite(LogicalTapeSet *lts, int tapenum, void *ptr, size_t size)
Definition: logtape.c:464
void LogicalTapeSetClose(LogicalTapeSet *lts)
Definition: logtape.c:427
void LogicalTapeSeek(LogicalTapeSet *lts, int tapenum, long blocknum, int offset)
Definition: logtape.c:839
void LogicalTapeSetForgetFreeSpace(LogicalTapeSet *lts)
Definition: logtape.c:453
void LogicalTapeFreeze(LogicalTapeSet *lts, int tapenum)
Definition: logtape.c:703
void LogicalTapeTell(LogicalTapeSet *lts, int tapenum, long *blocknum, int *offset)
Definition: logtape.c:870
size_t LogicalTapeBackspace(LogicalTapeSet *lts, int tapenum, size_t size)
Definition: logtape.c:768
size_t LogicalTapeRead(LogicalTapeSet *lts, int tapenum, void *ptr, size_t size)
Definition: logtape.c:655
void LogicalTapeRewindForRead(LogicalTapeSet *lts, int tapenum, size_t buffer_size)
Definition: logtape.c:551
void LogicalTapeRewindForWrite(LogicalTapeSet *lts, int tapenum)
Definition: logtape.c:629