Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: aee2780f0b284521b252cd1e10fcaae457548312 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*******************************************************************************
 * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * CONTRIBUTORS:
 * 		Thomas Schuetz (initial contribution)
 *
 *******************************************************************************/

#ifndef _ETQUEUE_H_
#define _ETQUEUE_H_

#include <stddef.h>
#include "etDatatypes.h"

typedef struct etQueueObj {
	struct etQueueObj* next;
} etQueueObj;

typedef struct etQueue {
	etQueueObj* first;
	etQueueObj* last;
	etInt16 highWaterMark;
	etInt16 size;

} etQueue;

void etQueue_init(etQueue* self);

void etQueue_push(etQueue* self, etQueueObj* obj);

etQueueObj* etQueue_pop(etQueue* self);

etQueueObj* etQueue_getFirst(etQueue* self);

etQueueObj* etQueue_getLast(etQueue* self);

etBool etQueue_isNotEmpty(etQueue* self);

etInt16 etQueue_getHighWaterMark(etQueue* self);

etInt16 etQueue_getSize(etQueue* self);



#endif /* _ETQUEUE_H_ */

Back to the top