Added macros to use a pdeq as a wait queue
[libfirm] / ir / adt / list.h
index 201ed7f..8713e36 100644 (file)
@@ -55,8 +55,8 @@ static INLINE void __list_add(struct list_head *new_node,
 
 /**
  * list_add - add a new entry
- * @param new   new entry to be added
- * @param head  list head to add it after
+ * @param new_node   new entry to be added
+ * @param head       list head to add it after
  *
  * Insert a new entry after the specified head.
  * This is good for implementing stacks.
@@ -68,8 +68,8 @@ static INLINE void list_add(struct list_head *new_node, struct list_head *head)
 
 /**
  * list_add_tail - add a new entry
- * @param new   new entry to be added
- * @param head  list head to add it before
+ * @param new_node   new entry to be added
+ * @param head       list head to add it before
  *
  * Insert a new entry before the specified head.
  * This is useful for implementing queues.
@@ -176,11 +176,11 @@ static INLINE void list_splice(struct list_head *list, struct list_head *head)
 }
 
 /**
- * list_splice_init - join two lists and reinitialise the emptied list.
+ * list_splice_init - join two lists and reinitialize the emptied list.
  * @param list   the new list to add.
  * @param head   the place to add it in the first list.
  *
- * The list at @list is reinitialised
+ * The list at list is reinitialized
  */
 static INLINE void list_splice_init(struct list_head *list,
                                    struct list_head *head)
@@ -206,8 +206,7 @@ static INLINE void list_splice_init(struct list_head *list,
  * @param head the head for your list.
  */
 #define list_for_each(pos, head) \
-       for (pos = (head)->next, (pos->next); pos != (head); \
-               pos = pos->next, (pos->next))
+       for (pos = (head)->next; pos != (head); pos = pos->next)
 
 /**
  * __list_for_each     -       iterate over a list
@@ -228,8 +227,7 @@ static INLINE void list_splice_init(struct list_head *list,
  * @param head the head for your list.
  */
 #define list_for_each_prev(pos, head) \
-       for (pos = (head)->prev, (pos->prev); pos != (head); \
-               pos = pos->prev, (pos->prev))
+       for (pos = (head)->prev; pos != (head); pos = pos->prev)
 
 /**
  * list_for_each_safe  -       iterate over a list safe against removal of list entry
@@ -243,6 +241,7 @@ static INLINE void list_splice_init(struct list_head *list,
 
 /**
  * list_for_each_entry -       iterate over list of given type
+ * @param type    the type of the struct where the listhead is embedded in
  * @param pos     the type * to use as a loop counter.
  * @param head    the head for your list.
  * @param member  the name of the list_struct within the struct.
@@ -254,6 +253,7 @@ static INLINE void list_splice_init(struct list_head *list,
 
 /**
  * list_for_each_entry_reverse - iterate backwards over list of given type.
+ * @param type    the type of the struct where the listhead is embedded in
  * @param pos     the type * to use as a loop counter.
  * @param head    the head for your list.
  * @param member  the name of the list_struct within the struct.
@@ -266,6 +266,7 @@ static INLINE void list_splice_init(struct list_head *list,
 
 /**
  * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
+ * @param type    the type of the struct where the listhead is embedded in
  * @param pos     the type * to use as a loop counter.
  * @param n       another type * to use as temporary storage
  * @param head    the head for your list.