-
Notifications
You must be signed in to change notification settings - Fork 0
/
linkedList.h
33 lines (27 loc) · 901 Bytes
/
linkedList.h
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
/*
* File: LinkedList.h
* Authors: Danni Friedland & Yaniv Dudu
*
* Created on March 27, 2010, 3:09 PM
*/
#ifndef _LINKEDLIST_H
#define _LINKEDLIST_H
#include <stdlib.h>
#include <stdio.h>
#include "globalDefs.h"
typedef struct node_s {
void *data;
struct node_s *next;
} node_t,*node_t_p;
node_t_p list_find(node_t_p node, int(*func)(void*,void*), void *data);
node_t_p list_at(node_t_p list, int index);
op_status list_remove_thread(node_t_p list, tID id);
op_status list_clear_all_threads(node_t_p list);
int list_foreach(node_t_p node, int(*func)(void*));
node_t_p list_insert_beginning(node_t_p list, void* data);
op_status list_insert_after(node_t_p node, void* data);
node_t_p list_create(void* data);
op_status list_add_last (node_t_p list, void* data);
op_status list_add_last_rec (node_t_p list, void* data);
boolean list_is_empty (node_t_p list);
#endif /* _LINKEDLIST_H */