diff options
author | 2000-11-16 20:02:15 +0000 | |
---|---|---|
committer | 2000-11-16 20:02:15 +0000 | |
commit | 1a12e8a7ab11e47f6fb18cdbc03b05e8885dfcad (patch) | |
tree | 21c49b483d84ca5ca2b0b9f8491c15f7b579b1f3 /sys/sys/queue.h | |
parent | Add uscanner.c. (diff) | |
download | wireguard-openbsd-1a12e8a7ab11e47f6fb18cdbc03b05e8885dfcad.tar.xz wireguard-openbsd-1a12e8a7ab11e47f6fb18cdbc03b05e8885dfcad.zip |
support kernel event queues, from FreeBSD by Jonathan Lemon,
okay art@, millert@
Diffstat (limited to 'sys/sys/queue.h')
-rw-r--r-- | sys/sys/queue.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 269af413c35..d2aeeba377d 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -1,4 +1,4 @@ -/* $OpenBSD: queue.h,v 1.16 2000/09/07 19:47:59 art Exp $ */ +/* $OpenBSD: queue.h,v 1.17 2000/11/16 20:02:20 provos Exp $ */ /* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */ /* @@ -136,6 +136,19 @@ struct { \ (head)->slh_first = (head)->slh_first->field.sle_next; \ } while (0) +#define SLIST_REMOVE(head, elm, type, field) do { \ + if ((head)->slh_first == (elm)) { \ + SLIST_REMOVE_HEAD((head), field); \ + } \ + else { \ + struct type *curelm = (head)->slh_first; \ + while( curelm->field.sle_next != (elm) ) \ + curelm = curelm->field.sle_next; \ + curelm->field.sle_next = \ + curelm->field.sle_next->field.sle_next; \ + } \ +} while (0) + /* * List definitions. */ |