Expose a stub interface
This commit is contained in:
parent
385dbd2a1f
commit
5d730b22ac
|
@ -0,0 +1,33 @@
|
|||
#ifndef __ORDINARY_H_
|
||||
#define __ORDINARY_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct ordinary_node {
|
||||
struct ordinary_node *prev;
|
||||
struct ordinary_node *next;
|
||||
void *val;
|
||||
};
|
||||
|
||||
struct ordinary_list {
|
||||
struct ordinary_node *head;
|
||||
struct ordinary_node *tail;
|
||||
uint32_t count;
|
||||
uint32_t limit;
|
||||
};
|
||||
|
||||
typedef uint8_t (*callback)(struct ordinary_node *node, uint32_t idx);
|
||||
|
||||
void ordinary_list_new(struct ordinary_list *list, uint32_t limit);
|
||||
void ordinary_list_del(struct ordinary_list *list);
|
||||
|
||||
struct ordinary_node *ordinary_list_add(struct ordinary_list *list, void *val);
|
||||
void standard_list_mov(struct standard_list *list, struct standard_node *node);
|
||||
void ordinary_list_rem(struct ordinary_list *list, struct ordinary_node *node);
|
||||
struct ordinary_node *ordinary_list_pop(struct ordinary_list *list);
|
||||
|
||||
struct ordinary_node *ordinary_list_at(struct ordinary_list *list, uint32_t idx);
|
||||
struct ordinary_node *ordinary_list_find(struct ordinary_list *list, callback cb);
|
||||
uint8_t ordinary_list_for(struct ordinary_list *list, callback cb);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue