2 |
- |
1 |
/*
|
|
|
2 |
* sorted by 4,/^$/|sort -bd +1
|
|
|
3 |
*/
|
|
|
4 |
int addarena(Arena *name);
|
|
|
5 |
void addstat(int, int);
|
|
|
6 |
void addstat2(int, int, int, int);
|
|
|
7 |
ZBlock *alloczblock(u32int size, int zeroed, uint alignment);
|
|
|
8 |
Arena *amapitoa(Index *index, u64int a, u64int *aa);
|
|
|
9 |
Arena *amapitoag(Index *index, u64int a, u64int *gstart, u64int *glimit, int *g);
|
|
|
10 |
u64int arenadirsize(Arena *arena, u32int clumps);
|
|
|
11 |
int arenatog(Arena *arena, u64int aa, u64int *gstart, u64int *glimit, int *g);
|
|
|
12 |
void arenaupdate(Arena *arena, u32int size, u8int *score);
|
|
|
13 |
int asumload(Arena *arena, int g, IEntry *entries, int maxentries);
|
|
|
14 |
void backsumarena(Arena *arena);
|
|
|
15 |
void binstats(long (*fn)(Stats *s0, Stats *s1, void*), void *arg, long t0, long t1, Statbin *bin, int nbin);
|
|
|
16 |
int bloominit(Bloom*, vlong, uchar*);
|
|
|
17 |
int bucklook(u8int*, int, u8int*, int);
|
|
|
18 |
u32int buildbucket(Index *ix, IEStream *ies, IBucket *ib, uint);
|
|
|
19 |
void checkdcache(void);
|
|
|
20 |
void checklumpcache(void);
|
|
|
21 |
int clumpinfoeq(ClumpInfo *c, ClumpInfo *d);
|
|
|
22 |
int clumpinfoeq(ClumpInfo *c, ClumpInfo *d);
|
|
|
23 |
u32int clumpmagic(Arena *arena, u64int aa);
|
|
|
24 |
uint countbits(uint n);
|
|
|
25 |
int delarena(Arena *arena);
|
|
|
26 |
void delaykickicache(void);
|
|
|
27 |
void delaykickround(Round*);
|
|
|
28 |
void delaykickroundproc(void*);
|
|
|
29 |
void dirtydblock(DBlock*, int);
|
|
|
30 |
void diskaccess(int);
|
|
|
31 |
void disksched(void);
|
|
|
32 |
void *emalloc(ulong);
|
|
|
33 |
void emptydcache(void);
|
|
|
34 |
void emptyicache(void);
|
|
|
35 |
void emptylumpcache(void);
|
|
|
36 |
void *erealloc(void *, ulong);
|
|
|
37 |
char *estrdup(char*);
|
|
|
38 |
void *ezmalloc(ulong);
|
|
|
39 |
Arena *findarena(char *name);
|
|
|
40 |
int flushciblocks(Arena *arena);
|
|
|
41 |
void flushdcache(void);
|
|
|
42 |
void flushicache(void);
|
|
|
43 |
int flushpart(Part*);
|
|
|
44 |
void flushqueue(void);
|
|
|
45 |
void fmtzbinit(Fmt *f, ZBlock *b);
|
|
|
46 |
void freearena(Arena *arena);
|
|
|
47 |
void freearenapart(ArenaPart *ap, int freearenas);
|
|
|
48 |
void freeiestream(IEStream *ies);
|
|
|
49 |
void freeifile(IFile *f);
|
|
|
50 |
void freeisect(ISect *is);
|
|
|
51 |
void freeindex(Index *index);
|
|
|
52 |
void freepart(Part *part);
|
|
|
53 |
void freezblock(ZBlock *b);
|
|
|
54 |
DBlock *_getdblock(Part *part, u64int addr, int mode, int load);
|
|
|
55 |
DBlock *getdblock(Part *part, u64int addr, int mode);
|
|
|
56 |
u32int hashbits(u8int *score, int nbits);
|
|
|
57 |
char *hargstr(HConnect*, char*, char*);
|
|
|
58 |
vlong hargint(HConnect*, char*, vlong);
|
|
|
59 |
int hdebug(HConnect*);
|
|
|
60 |
int hdisk(HConnect*);
|
|
|
61 |
int hnotfound(HConnect*);
|
|
|
62 |
int hproc(HConnect*);
|
|
|
63 |
int hsethtml(HConnect*);
|
|
|
64 |
int hsettext(HConnect*);
|
|
|
65 |
int httpdinit(char *address, char *webroot);
|
|
|
66 |
int iaddrcmp(IAddr *ia1, IAddr *ia2);
|
|
|
67 |
IEntry* icachedirty(u32int, u32int, u64int);
|
|
|
68 |
ulong icachedirtyfrac(void);
|
|
|
69 |
void icacheclean(IEntry*);
|
|
|
70 |
int icachelookup(u8int *score, int type, IAddr *ia);
|
|
|
71 |
AState icachestate(void);
|
|
|
72 |
int ientrycmp(const void *vie1, const void *vie2);
|
|
|
73 |
char *ifileline(IFile *f);
|
|
|
74 |
int ifilename(IFile *f, char *dst);
|
|
|
75 |
int ifileu32int(IFile *f, u32int *r);
|
|
|
76 |
int inbloomfilter(Bloom*, u8int*);
|
|
|
77 |
int indexsect(Index *ix, u8int *score);
|
|
|
78 |
int indexsect0(Index *ix, u32int buck);
|
|
|
79 |
Arena *initarena(Part *part, u64int base, u64int size, u32int blocksize);
|
|
|
80 |
ArenaPart *initarenapart(Part *part);
|
|
|
81 |
int initarenasum(void);
|
|
|
82 |
void initbloomfilter(Index*);
|
|
|
83 |
void initdcache(u32int mem);
|
|
|
84 |
void initicache(u32int mem);
|
|
|
85 |
void initicachewrite(void);
|
|
|
86 |
IEStream *initiestream(Part *part, u64int off, u64int clumps, u32int size);
|
|
|
87 |
ISect *initisect(Part *part);
|
|
|
88 |
Index *initindex(char *name, ISect **sects, int n);
|
|
|
89 |
void initlumpcache(u32int size, u32int nblocks);
|
|
|
90 |
int initlumpqueues(int nq);
|
|
|
91 |
Part* initpart(char *name, int mode);
|
|
|
92 |
void initround(Round*, char*, int);
|
|
|
93 |
int initventi(char *config, Config *conf);
|
|
|
94 |
void insertlump(Lump *lump, Packet *p);
|
|
|
95 |
int insertscore(u8int *score, IAddr *ia, int state, AState *as);
|
|
|
96 |
void kickdcache(void);
|
|
|
97 |
void kickicache(void);
|
|
|
98 |
void kickround(Round*, int wait);
|
|
|
99 |
int loadbloom(Bloom*);
|
|
|
100 |
ZBlock *loadclump(Arena *arena, u64int aa, int blocks, Clump *cl, u8int *score, int verify);
|
|
|
101 |
DBlock *loadibucket(Index *index, u8int *score, ISect **is, u32int *buck, IBucket *ib);
|
|
|
102 |
int loadientry(Index *index, u8int *score, int type, IEntry *ie);
|
|
|
103 |
void logerr(int severity, char *fmt, ...);
|
|
|
104 |
Lump *lookuplump(u8int *score, int type);
|
|
|
105 |
int lookupscore(u8int *score, int type, IAddr *ia);
|
|
|
106 |
int maparenas(AMap *am, Arena **arenas, int n, char *what);
|
|
|
107 |
void markbloomfilter(Bloom*, u8int*);
|
|
|
108 |
uint msec(void);
|
|
|
109 |
int namecmp(char *s, char *t);
|
|
|
110 |
void namecp(char *dst, char *src);
|
|
|
111 |
int nameok(char *name);
|
|
|
112 |
void needmainindex(void);
|
|
|
113 |
void needzeroscore(void);
|
|
|
114 |
Arena *newarena(Part *part, u32int, char *name, u64int base, u64int size, u32int blocksize);
|
|
|
115 |
ArenaPart *newarenapart(Part *part, u32int blocksize, u32int tabsize);
|
|
|
116 |
ISect *newisect(Part *part, u32int vers, char *name, u32int blocksize, u32int tabsize);
|
|
|
117 |
Index *newindex(char *name, ISect **sects, int n);
|
|
|
118 |
u32int now(void);
|
|
|
119 |
int okamap(AMap *am, int n, u64int start, u64int stop, char *what);
|
|
|
120 |
int okibucket(IBucket*, ISect*);
|
|
|
121 |
int outputamap(Fmt *f, AMap *am, int n);
|
|
|
122 |
int outputindex(Fmt *f, Index *ix);
|
|
|
123 |
int _packarena(Arena *arena, u8int *buf, int);
|
|
|
124 |
int packarena(Arena *arena, u8int *buf);
|
|
|
125 |
int packarenahead(ArenaHead *head, u8int *buf);
|
|
|
126 |
int packarenapart(ArenaPart *as, u8int *buf);
|
|
|
127 |
void packbloomhead(Bloom*, u8int*);
|
|
|
128 |
int packclump(Clump *c, u8int *buf, u32int);
|
|
|
129 |
void packclumpinfo(ClumpInfo *ci, u8int *buf);
|
|
|
130 |
void packibucket(IBucket *b, u8int *buf, u32int magic);
|
|
|
131 |
void packientry(IEntry *i, u8int *buf);
|
|
|
132 |
int packisect(ISect *is, u8int *buf);
|
|
|
133 |
void packmagic(u32int magic, u8int *buf);
|
|
|
134 |
ZBlock *packet2zblock(Packet *p, u32int size);
|
|
|
135 |
int parseamap(IFile *f, AMapN *amn);
|
|
|
136 |
int parseindex(IFile *f, Index *ix);
|
|
|
137 |
void partblocksize(Part *part, u32int blocksize);
|
|
|
138 |
int partifile(IFile *f, Part *part, u64int start, u32int size);
|
|
|
139 |
void printarenapart(int fd, ArenaPart *ap);
|
|
|
140 |
void printarena(int fd, Arena *arena);
|
|
|
141 |
void printindex(int fd, Index *ix);
|
|
|
142 |
void printstats(void);
|
|
|
143 |
void putdblock(DBlock *b);
|
|
|
144 |
void putlump(Lump *b);
|
|
|
145 |
int queuewrite(Lump *b, Packet *p, int creator, uint ms);
|
|
|
146 |
u32int readarena(Arena *arena, u64int aa, u8int *buf, long n);
|
|
|
147 |
int readarenamap(AMapN *amn, Part *part, u64int base, u32int size);
|
|
|
148 |
Bloom *readbloom(Part*);
|
|
|
149 |
int readclumpinfo(Arena *arena, int clump, ClumpInfo *ci);
|
|
|
150 |
int readclumpinfos(Arena *arena, int clump, ClumpInfo *cis, int n);
|
|
|
151 |
ZBlock *readfile(char *name);
|
|
|
152 |
int readifile(IFile *f, char *name);
|
|
|
153 |
Packet *readlump(u8int *score, int type, u32int size, int *cached);
|
|
|
154 |
int readpart(Part *part, u64int addr, u8int *buf, u32int n);
|
|
|
155 |
int resetbloom(Bloom*);
|
|
|
156 |
int runconfig(char *config, Config*);
|
|
|
157 |
int scorecmp(u8int *, u8int *);
|
|
|
158 |
void scoremem(u8int *score, u8int *buf, int size);
|
|
|
159 |
void setatailstate(AState*);
|
|
|
160 |
void seterr(int severity, char *fmt, ...);
|
|
|
161 |
void setstat(int, long);
|
|
|
162 |
void settrace(char *type);
|
|
|
163 |
u64int sortrawientries(Index *ix, Part *tmp, u64int *tmpoff, Bloom *bloom);
|
|
|
164 |
void startbloomproc(Bloom*);
|
|
|
165 |
Memimage* statgraph(Graph *g);
|
|
|
166 |
void statsinit(void);
|
|
|
167 |
int storeclump(Index *index, ZBlock *b, u8int *score, int type, u32int creator, IAddr *ia);
|
|
|
168 |
int storeientry(Index *index, IEntry *m);
|
|
|
169 |
int strscore(char *s, u8int *score);
|
|
|
170 |
int stru32int(char *s, u32int *r);
|
|
|
171 |
int stru64int(char *s, u64int *r);
|
|
|
172 |
void sumarena(Arena *arena);
|
|
|
173 |
int syncarena(Arena *arena, u32int n, int zok, int fix);
|
|
|
174 |
int syncindex(Index *ix);
|
|
|
175 |
void trace(char *type, char*, ...);
|
|
|
176 |
void traceinit(void);
|
|
|
177 |
int u64log2(u64int v);
|
|
|
178 |
u64int unittoull(char *s);
|
|
|
179 |
int unpackarena(Arena *arena, u8int *buf);
|
|
|
180 |
int unpackarenahead(ArenaHead *head, u8int *buf);
|
|
|
181 |
int unpackarenapart(ArenaPart *as, u8int *buf);
|
|
|
182 |
int unpackbloomhead(Bloom*, u8int*);
|
|
|
183 |
int unpackclump(Clump *c, u8int *buf, u32int);
|
|
|
184 |
void unpackclumpinfo(ClumpInfo *ci, u8int *buf);
|
|
|
185 |
void unpackibucket(IBucket *b, u8int *buf, u32int magic);
|
|
|
186 |
void unpackientry(IEntry *i, u8int *buf);
|
|
|
187 |
int unpackisect(ISect *is, u8int *buf);
|
|
|
188 |
u32int unpackmagic(u8int *buf);
|
|
|
189 |
void ventifmtinstall(void);
|
|
|
190 |
void vtloghdump(Hio*, VtLog*);
|
|
|
191 |
void vtloghlist(Hio*);
|
|
|
192 |
int vtproc(void(*)(void*), void*);
|
|
|
193 |
int vttypevalid(int type);
|
|
|
194 |
void waitforkick(Round*);
|
|
|
195 |
int wbarena(Arena *arena);
|
|
|
196 |
int wbarenahead(Arena *arena);
|
|
|
197 |
int wbarenamap(AMap *am, int n, Part *part, u64int base, u64int size);
|
|
|
198 |
int wbarenapart(ArenaPart *ap);
|
|
|
199 |
void wbbloomhead(Bloom*);
|
|
|
200 |
int wbisect(ISect *is);
|
|
|
201 |
int wbindex(Index *ix);
|
|
|
202 |
int whackblock(u8int *dst, u8int *src, int ssize);
|
|
|
203 |
u64int writeaclump(Arena *a, Clump *c, u8int *clbuf);
|
|
|
204 |
u32int writearena(Arena *arena, u64int aa, u8int *clbuf, u32int n);
|
|
|
205 |
int writebloom(Bloom*);
|
|
|
206 |
int writeclumpinfo(Arena *arean, int clump, ClumpInfo *ci);
|
|
|
207 |
int writepng(Hio*, Memimage*);
|
|
|
208 |
u64int writeiclump(Index *ix, Clump *c, u8int *clbuf);
|
|
|
209 |
int writelump(Packet *p, u8int *score, int type, u32int creator, uint ms);
|
|
|
210 |
int writepart(Part *part, u64int addr, u8int *buf, u32int n);
|
|
|
211 |
int writeqlump(Lump *u, Packet *p, int creator, uint ms);
|
|
|
212 |
Packet *zblock2packet(ZBlock *zb, u32int size);
|
|
|
213 |
void zeropart(Part *part, int blocksize);
|
|
|
214 |
|
|
|
215 |
/*
|
|
|
216 |
#pragma varargck argpos sysfatal 1
|
|
|
217 |
#pragma varargck argpos logerr 2
|
|
|
218 |
#pragma varargck argpos SetErr 2
|
|
|
219 |
*/
|
|
|
220 |
|
|
|
221 |
#define scorecmp(h1,h2) memcmp((h1),(h2),VtScoreSize)
|
|
|
222 |
#define scorecp(h1,h2) memmove((h1),(h2),VtScoreSize)
|
|
|
223 |
|
|
|
224 |
#define MK(t) ((t*)emalloc(sizeof(t)))
|
|
|
225 |
#define MKZ(t) ((t*)ezmalloc(sizeof(t)))
|
|
|
226 |
#define MKN(t,n) ((t*)emalloc((n)*sizeof(t)))
|
|
|
227 |
#define MKNZ(t,n) ((t*)ezmalloc((n)*sizeof(t)))
|
|
|
228 |
#define MKNA(t,at,n) ((t*)emalloc(sizeof(t) + (n)*sizeof(at)))
|