6 volatile int isFull(
volatile int *QCount) {
13 volatile int isEmpty(
volatile int *QCount) {
17 void enqueueWQ(
volatile PD **p,
volatile PD **Queue,
volatile int *QCount) {
22 int i = (*QCount) - 1;
25 Queue[i+1] = Queue[i];
33 void enqueueSQ(
volatile PD **p,
volatile PD **Queue,
volatile int *QCount) {
38 int i = (*QCount) - 1;
40 volatile PD *
new = *p;
42 volatile PD *temp = Queue[i];
45 Queue[i+1] = Queue[i];
57 void enqueueRQ(
volatile PD **p,
volatile PD **Queue,
volatile int *QCount) {
62 int i = (*QCount) - 1;
64 volatile PD *
new = *p;
66 volatile PD *temp = Queue[i];
68 while(i >= 0 && (new->inheritedPy >= temp->
inheritedPy)) {
69 Queue[i+1] = Queue[i];
88 volatile PD* result =
NULL;
89 for (i = (*QCount)-1; i>=0; i--) {
96 while(i<(*QCount)-1) {
97 Queue[i] = Queue[i+1];
116 volatile PD* result =
NULL;
117 for (i = (*QCount)-1; i >= 0; i--) {
118 if((Queue[i]->suspended == 0) && (Queue[i]->state ==
READY)) {
124 while(i < (*QCount)-1) {
125 Queue[i] = Queue[i+1];
143 volatile PD *result = (Queue[(*QCount)-1]);
volatile int isFull(volatile int *QCount)
volatile PD * dequeue(volatile PD **Queue, volatile int *QCount)
void enqueueRQ(volatile PD **p, volatile PD **Queue, volatile int *QCount)
volatile int isEmpty(volatile int *QCount)
volatile PD * dequeueRQ(volatile PD **Queue, volatile int *QCount)
void enqueueSQ(volatile PD **p, volatile PD **Queue, volatile int *QCount)
volatile PD * dequeueWQ(volatile PD **Queue, volatile int *QCount, MUTEX m)
void enqueueWQ(volatile PD **p, volatile PD **Queue, volatile int *QCount)