21#define INTQ_BUFSIZE 64
void intq_init(struct intq *)
Initializes interrupt queue Q.
bool intq_empty(const struct intq *)
Returns true if Q is empty, false otherwise.
bool intq_full(const struct intq *)
Returns true if Q is full, false otherwise.
#define INTQ_BUFSIZE
An "interrupt queue", a circular buffer shared between kernel threads and external interrupt handlers...
uint8_t intq_getc(struct intq *)
Removes a byte from Q and returns it.
void intq_putc(struct intq *, uint8_t)
devices/intq.h
A circular queue of bytes.
struct thread * not_empty
Thread waiting for not-empty condition.
int head
New data is written here.
int tail
Old data is read here.
uint8_t buf[INTQ_BUFSIZE]
Buffer.
struct thread * not_full
Thread waiting for not-full condition.
A kernel thread or user process.