PULSAR  2.0.0
Parallel Ultra-Light Systolic Array Runtime
 All Data Structures Files Functions Typedefs Enumerations Macros Groups
icl_deque.h
Go to the documentation of this file.
1 
11 #ifndef ICL_DEQUE_H
12 #define ICL_DEQUE_H
13 
14 #include <limits.h>
15 #include <stdlib.h>
16 #include <pthread.h>
17 #include "icl_list.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 typedef icl_list_t icl_node_t;
24 typedef struct icl_deque_s {
25  pthread_spinlock_t spinlock;
26  icl_list_t *list;
27  int size;
28 } icl_deque_t;
29 
31 int icl_deque_destroy(icl_deque_t *deque, void (*free_func)(void*));
32 icl_node_t* icl_deque_first(icl_deque_t *deque);
33 icl_node_t* icl_deque_next(icl_deque_t *deque, icl_node_t *node);
34 icl_node_t* icl_deque_append(icl_deque_t *deque, void *data);
35 icl_node_t* icl_deque_prepend(icl_deque_t *deque, void *data);
37  icl_deque_t *deque, icl_node_t *node, void (*free_func)(void*));
38 int icl_deque_size(icl_deque_t *deque);
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #endif /* ICL_DEQUE_H */