blob: 52cc579b9aba49650924d234b850b1ed9114d97f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#ifndef __IFMO_DISTRIBUTED_CLASS_QUEUE__H
#define __IFMO_DISTRIBUTED_CLASS_QUEUE__H
#include "ipc.h"
typedef struct Node {
local_id id;
timestamp_t time;
struct Node* next;
} node_t;
typedef struct Queue {
struct Node* front;
struct Node* rear;
} queue_t;
void dequeue(queue_t *q);
void enqueue(queue_t *q, local_id id, timestamp_t time);
node_t *front(queue_t *q);
#endif
|