kosmos/source/firmware/kernel/interface/list.h

26 lines
459 B
C
Raw Normal View History

2016-07-28 19:02:54 +00:00
/*
* list.h
*
* Created on: Jul 27, 2016
* Author: tkl
*/
#ifndef SOURCE_FIRMWARE_KERNEL_LIST_H_
#define SOURCE_FIRMWARE_KERNEL_LIST_H_
struct list_node {
struct list_node *next;
unsigned int data;
};
struct list {
struct list_node *front;
struct list_node *rear;
};
int list_init(struct list *head);
int list_add(struct list *head, struct list_node *node);
2016-08-11 09:04:54 +00:00
int list_get_len(struct list *head);
2016-07-28 19:02:54 +00:00
#endif /* SOURCE_FIRMWARE_KERNEL_LIST_H_ */