28 lines
421 B
C
28 lines
421 B
C
#ifndef QUEUE_H
|
|
#define QUEUE_H
|
|
|
|
#include <stdbool.h>
|
|
#include "process.h"
|
|
|
|
typedef struct Queue {
|
|
Process *start;
|
|
Process *end;
|
|
int size;
|
|
} Queue;
|
|
|
|
int contains(Queue *queue, char *username);
|
|
|
|
Process *search(Queue *queue, char *username);
|
|
|
|
void enqueue(Queue *queue, Process *process);
|
|
|
|
Process *dequeue(Queue *queue);
|
|
|
|
void printList(Queue *queue);
|
|
|
|
int stop(Queue *queue);
|
|
|
|
Queue* createQueue();
|
|
|
|
#endif //QUEUE_H
|