mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-15 11:20:03 +00:00
22 lines
280 B
C
22 lines
280 B
C
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);
|