Roomba Tank
CSC 460 Project 3
queue.h
Go to the documentation of this file.
1 #ifndef _QUEUE_H_
2 #define _QUEUE_H_
3 
4 #include "os.h"
5 
6 volatile int isFull(volatile int *QCount);
7 volatile int isEmpty(volatile int *QCount);
8 void enqueueSQ(volatile PD **p, volatile PD **Queue, volatile int *QCount);
9 void enqueueRQ(volatile PD **p, volatile PD **Queue, volatile int *QCount);
10 volatile PD *dequeueRQ(volatile PD **Queue, volatile int *QCount);
11 volatile PD *dequeue(volatile PD **Queue, volatile int *QCount);
12 
13 extern volatile PD *ReadyQueue[MAXTHREAD];
14 extern volatile int RQCount;
15 
16 extern volatile PD *SleepQueue[MAXTHREAD];
17 extern volatile int SQCount;
18 
19 extern volatile PD *WaitingQueue[MAXTHREAD];
20 extern volatile int WQCount;
21 
22 #endif /* _QUEUE_H_ */
volatile int WQCount
Definition: os.c:113
volatile PD * WaitingQueue[MAXTHREAD]
Definition: os.c:112
volatile int RQCount
Definition: os.c:105
void enqueueRQ(volatile PD **p, volatile PD **Queue, volatile int *QCount)
Definition: queue.c:57
volatile int SQCount
Definition: os.c:109
void enqueueSQ(volatile PD **p, volatile PD **Queue, volatile int *QCount)
Definition: queue.c:33
#define MAXTHREAD
Definition: os.h:4
volatile int isEmpty(volatile int *QCount)
Definition: queue.c:13
volatile PD * dequeueRQ(volatile PD **Queue, volatile int *QCount)
Definition: queue.c:109
volatile int isFull(volatile int *QCount)
Definition: queue.c:6
volatile PD * dequeue(volatile PD **Queue, volatile int *QCount)
Definition: queue.c:137
volatile PD * SleepQueue[MAXTHREAD]
Definition: os.c:108
volatile PD * ReadyQueue[MAXTHREAD]
Definition: os.c:104