Added a macro to iterate through the kqueue.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2416 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-01-12 16:00:59 +00:00
parent 1c204d8bb9
commit 49c987ef8d
1 changed files with 4 additions and 0 deletions

View File

@ -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 */