PKUOS - Pintos
Pintos source browser for PKU Operating System course
Data Fields
intq Struct Reference

A circular queue of bytes. More...

#include <intq.h>

Collaboration diagram for intq:
Collaboration graph
[legend]

Data Fields

struct lock lock
 Only one thread may wait at once. More...
 
struct threadnot_full
 Thread waiting for not-full condition. More...
 
struct threadnot_empty
 Thread waiting for not-empty condition. More...
 
uint8_t buf [INTQ_BUFSIZE]
 Buffer. More...
 
int head
 New data is written here. More...
 
int tail
 Old data is read here. More...
 

Detailed Description

A circular queue of bytes.

Definition at line 24 of file intq.h.

Field Documentation

◆ buf

uint8_t intq::buf[INTQ_BUFSIZE]

Buffer.

Definition at line 32 of file intq.h.

Referenced by intq_getc(), and intq_putc().

◆ head

int intq::head

New data is written here.

Definition at line 33 of file intq.h.

Referenced by intq_empty(), intq_full(), intq_init(), and intq_putc().

◆ lock

struct lock intq::lock

Only one thread may wait at once.

Definition at line 27 of file intq.h.

Referenced by intq_getc(), intq_init(), and intq_putc().

◆ not_empty

struct thread* intq::not_empty

Thread waiting for not-empty condition.

Definition at line 29 of file intq.h.

Referenced by intq_getc(), intq_init(), and intq_putc().

◆ not_full

struct thread* intq::not_full

Thread waiting for not-full condition.

Definition at line 28 of file intq.h.

Referenced by intq_getc(), intq_init(), and intq_putc().

◆ tail

int intq::tail

Old data is read here.

Definition at line 34 of file intq.h.

Referenced by intq_empty(), intq_full(), intq_getc(), and intq_init().


The documentation for this struct was generated from the following file: