diff --git a/headers/private/kernel/kqueue.h b/headers/private/kernel/kqueue.h index 2edfda5396..5ba2fba487 100644 --- a/headers/private/kernel/kqueue.h +++ b/headers/private/kernel/kqueue.h @@ -17,6 +17,10 @@ struct quehead { struct quehead *prev; }; +/* You can use this macro to iterate through the queue. */ +#define kqueue_foreach(head, element) \ + for ((element) = (void *)(head)->next; (element) != (void *)(head); (element) = (void *)((struct quehead *)(element))->next) + /** Initializes a queue to be used */