~kennylevinsen/seatd

seatd/include/linked_list.h -rw-r--r-- 462 bytes
355cc9c9Kenny Levinsen meson: Support building builtin without seatd 19 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef _LINKED_LIST_H
#define _LINKED_LIST_H

#include <stdbool.h>

struct linked_list {
	struct linked_list *prev;
	struct linked_list *next;
};

void linked_list_init(struct linked_list *list);
void linked_list_insert(struct linked_list *list, struct linked_list *elem);
void linked_list_remove(struct linked_list *elem);
bool linked_list_empty(struct linked_list *list);
void linked_list_take(struct linked_list *target, struct linked_list *source);

#endif