diff options
author | n_hibma <n_hibma@FreeBSD.org> | 1998-11-26 23:13:13 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 1998-11-26 23:13:13 +0000 |
commit | 1f1ab4819c23e37e12cd77a9f862f0b56a026bd6 (patch) | |
tree | 34b8718ca7c243ba6fca181b98eb980de3d02aca /sys/dev/usb/queue.addendum.h | |
parent | cb434691d915a69b39259cd29b94ec59672a7ca3 (diff) | |
download | FreeBSD-src-1f1ab4819c23e37e12cd77a9f862f0b56a026bd6.zip FreeBSD-src-1f1ab4819c23e37e12cd77a9f862f0b56a026bd6.tar.gz |
Initial commit of ported NetBSD USB stack
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 0000000..9252342 --- /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 + |