1: /*
2: ** ACCINTERN.H -- internal declarations for the access methods
3: **
4: ** Nothing in here should be needed for the outside world.
5: **
6: ** Version:
7: ** @(#)accintern.h 8.1 12/31/84
8: */
9:
10: # include <access.h>
11:
12:
13: # define NACCBUFS 3 /* number of access method buffers */
14:
15:
16: /* the following is the access methods buffer */
17: struct accbuf
18: {
19: /* this stuff is actually stored in the relation */
20: long mainpg; /* next main page (0 - eof) */
21: long ovflopg; /* next ovflo page (0 - none) */
22: short nxtlino; /* next avail line no for this page */
23: char firstup[PGSIZE - 12]; /* tuple space */
24: short linetab[1]; /* line table at end of buffer - grows down */
25: /* linetab[lineno] is offset into
26: ** the buffer for that line; linetab[nxtlino]
27: ** is free space pointer */
28:
29: /* this stuff is not stored in the relation */
30: long rel_tupid; /* unique relation id */
31: long thispage; /* page number of the current page */
32: int filedesc; /* file descriptor for this reln */
33: struct accbuf *modf; /* use time link list forward pointer */
34: struct accbuf *modb; /* back pointer */
35: int bufstatus; /* various bits defined below */
36: };
37:
38: /* The following assignments are status bits for accbuf.bufstatus */
39: # define BUF_DIRTY 001 /* page has been changed */
40: # define BUF_LOCKED 002 /* page has a page lock on it */
41: # define BUF_DIRECT 004 /* this is a page from isam direct */
42:
43: /* access method buffer typed differently for various internal operations */
44: struct
45: {
46: char acc_buf[NACCBUFS];
47: };
48:
49: /* pointers to maintain the buffer */
50: extern struct accbuf *Acc_head; /* head of the LRU list */
51: extern struct accbuf *Acc_tail; /* tail of the LRU list */
52: extern struct accbuf Acc_buf[NACCBUFS]; /* the buffers themselves */
53:
54:
55: /*
56: ** PGTUPLE -- btree index key (a tid and an index key)
57: */
58:
59: struct pgtuple
60: {
61: struct tup_id childtid; /* the pointer comes before */
62: char childtup[MAXTUP];
63: };
64:
65:
66: /*
67: ** Global values used by everything
68: */
69:
70: extern char *Acctuple; /* pointer to canonical tuple */
71: extern char Accanon[MAXTUP]; /* canonical tuple buffer */
72:
73: /*
74: ** In-line expansion of trace flags.
75: */
76:
77: extern short *tT;
78: # ifndef PDP11
79: # ifndef tTf
80: # define tTf(a, b) ((b < 0) ? tT[a] : (tT[a] & (1 << b)))
81: # endif tTf
82: # endif PDP11
Defined struct's
accbuf
defined in line
17; used 10 times
Defined macros
tTf
defined in line
80; used 1 times