diff options
author | Maria Matejka <mq@ucw.cz> | 2022-07-18 12:33:00 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-07-18 12:33:00 +0200 |
commit | 08c84846089a131a0e7e9e0185b6c6ccb4ed4e2d (patch) | |
tree | bcf82552565dcdb0c5e722a0bb837b1e948ed955 /lib/lists.h | |
parent | 4b6f5ee8709b2fae9da13c58bfbae21b84cd40c5 (diff) | |
parent | 94eb0858c2b938549d9d1703c872c6149901e7dd (diff) |
Merge commit '94eb0858' into thread-next
Diffstat (limited to 'lib/lists.h')
-rw-r--r-- | lib/lists.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/lists.h b/lib/lists.h index 7e6d5467..86ff59c9 100644 --- a/lib/lists.h +++ b/lib/lists.h @@ -69,6 +69,18 @@ typedef union list { /* In fact two overlayed nodes */ #define EMPTY_LIST(list) (!(list).head->next) +static inline _Bool +enlisted(node *n) +{ + switch ((!!n->next) + (!!n->prev)) + { + case 0: return 0; + case 2: return 1; + case 1: bug("Garbled event list node"); + } + + bug("Maths is broken. And you should see a new heaven and a new earth: for the first heaven and the first earth had been passed away."); +} #ifndef _BIRD_LISTS_C_ #define LIST_INLINE static inline |