diff options
| author | Nick Hibma <n_hibma@FreeBSD.org> | 1998-11-26 23:13:13 +0000 |
|---|---|---|
| committer | Nick Hibma <n_hibma@FreeBSD.org> | 1998-11-26 23:13:13 +0000 |
| commit | 0cec007c5f3f6a22c8bc7bc4cebfccac8afbb11e (patch) | |
| tree | 53dc2c5ae004d3b075c1bd5120852fe4c8ca2ec3 /sys/dev/usb/queue.addendum.h | |
| parent | 48ecb15bdcb6f422d4088bd0430b1dd5ea1c7db6 (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb/queue.addendum.h')
| -rw-r--r-- | sys/dev/usb/queue.addendum.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/dev/usb/queue.addendum.h b/sys/dev/usb/queue.addendum.h new file mode 100644 index 0000000000000..9252342d797e6 --- /dev/null +++ b/sys/dev/usb/queue.addendum.h @@ -0,0 +1,29 @@ +/* These definitions are taken from the NetBSD /sys/sys/queue.h file + * The copyright as in /sys/sys/queue.h from FreeBSD applies (they are the same) + */ + +/* This was called SIMPLEQ + */ +#ifndef STAILQ_HEAD_INITIALIZER +#define STAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).stqh_first } +#endif + +/* This one was called SIMPLEQ_REMOVE_HEAD but removes not only the + * head element, but a whole queue of elements from the head. + */ +#ifndef STAILQ_REMOVE_HEAD_QUEUE +#define STAILQ_REMOVE_HEAD_QUEUE(head, elm, field) do { \ + if (((head)->stqh_first = (elm)->field.stqe_next) == NULL) \ + (head)->stqh_last = &(head)->stqh_first; \ +} while (0) +#endif + + +/* This is called LIST and was called like that as well in the NetBSD version + */ +#ifndef LIST_HEAD_INITIALIZER +#define LIST_HEAD_INITIALIZER(head) \ + { NULL } +#endif + |
