aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vbackup/queue.h
blob: 6b2317c3b878ac3542a9e44f7a5279e81fb5d925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
enum
{
	MAXQ = 256
};

typedef struct Queue Queue;
struct Queue
{
	struct {
		Block *db;
		u32int bno;
	} el[MAXQ];
	int ri, wi, nel, closed;

	QLock lk;
	Rendez r;
};

Queue	*qalloc(void);
void	qclose(Queue*);
Block	*qread(Queue*, u32int*);
void	qwrite(Queue*, Block*, u32int);