diff options
| author | Nick Hibma <n_hibma@FreeBSD.org> | 1999-04-20 22:37:18 +0000 |
|---|---|---|
| committer | Nick Hibma <n_hibma@FreeBSD.org> | 1999-04-20 22:37:18 +0000 |
| commit | 38a3a046fcb92d486ba6d15482d433d5bf15cec8 (patch) | |
| tree | 5754786d6440b258c7880a68bf274a806d1d6152 /sys | |
| parent | 1d8ca40c41d6d4e4e1f1a60e6835384367222c7f (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/usb/usb_subr.c | 4 | ||||
| -rw-r--r-- | sys/dev/usb/usbdi.c | 12 | ||||
| -rw-r--r-- | sys/sys/queue.h | 7 |
3 files changed, 17 insertions, 6 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 838d778e857c..cba6d3b20e45 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1040,7 +1040,11 @@ usb_start_next(pipe) #endif /* First remove remove old */ +#if defined(__NetBSD__) SIMPLEQ_REMOVE_HEAD(&pipe->queue, SIMPLEQ_FIRST(&pipe->queue), next); +#elif defined(__FreeBSD__) + SIMPLEQ_REMOVE_HEAD(&pipe->queue, next); +#endif if (pipe->state != USBD_PIPE_ACTIVE) { pipe->running = 0; return; diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 8b88cd3312c3..ee2f041c1d59 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -261,7 +261,11 @@ usbd_alloc_request() reqh = SIMPLEQ_FIRST(&usbd_free_requests); if (reqh) +#if defined(__NetBSD__) SIMPLEQ_REMOVE_HEAD(&usbd_free_requests, reqh, next); +#elif defined(__FreeBSD__) + SIMPLEQ_REMOVE_HEAD(&usbd_free_requests, next); +#endif else reqh = malloc(sizeof(*reqh), M_USB, M_NOWAIT); if (!reqh) @@ -918,7 +922,11 @@ usbd_ar_pipe(pipe) reqh = SIMPLEQ_FIRST(&pipe->queue); if (reqh == 0) break; +#if defined(__NetBSD__) SIMPLEQ_REMOVE_HEAD(&pipe->queue, reqh, next); +#elif defined(__FreeBSD__) + SIMPLEQ_REMOVE_HEAD(&pipe->queue, next); +#endif reqh->status = USBD_CANCELLED; if (reqh->callback) reqh->callback(reqh, reqh->priv, reqh->status); @@ -926,7 +934,11 @@ usbd_ar_pipe(pipe) #else while ((reqh = SIMPLEQ_FIRST(&pipe->queue))) { pipe->methods->abort(reqh); +#if defined(__NetBSD__) SIMPLEQ_REMOVE_HEAD(&pipe->queue, reqh, next); +#elif defined(__FreeBSD__) + SIMPLEQ_REMOVE_HEAD(&pipe->queue, next); +#endif } #endif return (USBD_NORMAL_COMPLETION); diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 87a62a0e7781..1063f7344897 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 - * $Id: queue.h,v 1.23 1999/01/06 20:03:11 n_hibma Exp $ + * $Id: queue.h,v 1.24 1999/01/07 22:27:53 n_hibma Exp $ */ #ifndef _SYS_QUEUE_H_ @@ -218,11 +218,6 @@ struct { \ (head)->stqh_last = &(head)->stqh_first; \ } while (0) -#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \ - if (((head)->stqh_first = (elm)->field.stqe_next) == NULL) \ - (head)->stqh_last = &(head)->stqh_first; \ -} while (0) - #define STAILQ_REMOVE(head, elm, type, field) do { \ if ((head)->stqh_first == (elm)) { \ |
