aboutsummaryrefslogtreecommitdiff
path: root/acid/venti
blob: 84e207c3bd484301129eacd58ee4ebe0dd19910e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
defn logs() {
	local h, p;
	p = (vl+sizeofQLock);
	loop 1, 1024 do
	{
		h = (VtLog)*p;
		while h do
		{
			print("log(",h\X,")  // ",*(h.name\s),"\n");
			h = (VtLog)h.next;
		}
		p = p+4;
	}
}

defn log(l) {
	local c, nc;

	l = (VtLog)l;
	c = l.w;
	loop 1,l.nchunk do {
		c = c+sizeofVtLogChunk;
		if c == l.chunk+l.nchunk*sizeofVtLogChunk then
			c = l.chunk;
		c = (VtLogChunk)c;
		print(stringn(c.p, c.wp-c.p)\s);
	}
}