SayoriOS  0.3.3
list.h
1 #ifndef LIST_H
2 #define LIST_H
3 
4 #include "common.h"
5 #include "sys/sync.h"
6 
7 /*-----------------------------------------------------------------------------
8  *
9  *---------------------------------------------------------------------------*/
10 typedef struct _list_item_t list_item_t;
11 
12 /*-----------------------------------------------------------------------------
13  *
14  *---------------------------------------------------------------------------*/
15 typedef struct
16 {
17  list_item_t* first;
18  size_t count;
19  mutex_t mutex;
20 
21 } list_t;
22 
23 /*-----------------------------------------------------------------------------
24  *
25  *---------------------------------------------------------------------------*/
27 {
28  list_item_t* prev;
29  list_item_t* next;
30  list_t* list;
31 };
32 
33 void list_init(list_t* list);
34 
35 void list_add(list_t* list, list_item_t* item);
36 
37 void list_remove(list_item_t* item);
38 
39 #endif
Основные определения ядра
Definition: list.h:16