summaryrefslogtreecommitdiff
path: root/kernel/lib/list.h
blob: b1f0127cd8aa4de02a89120c3c33a848d7cca24c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef LIST_H
#define LIST_H
struct list {
  void **entries;
  int capacity;
  int tail_index;
};

int list_init(struct list *list);
void list_reset(struct list *list);
void list_free(struct list *list);
int list_clone(struct list *in, struct list *out);
int list_add(struct list *list, void *entry, int *index);
int list_set(struct list *list, int index, void *entry);
int list_get(const struct list *list, int index, void **out);
#endif