diff options
Diffstat (limited to 'qcwcn/wifi_hal/list.h')
-rw-r--r-- | qcwcn/wifi_hal/list.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qcwcn/wifi_hal/list.h b/qcwcn/wifi_hal/list.h index 0417398..90d344c 100644 --- a/qcwcn/wifi_hal/list.h +++ b/qcwcn/wifi_hal/list.h @@ -59,4 +59,14 @@ void replace_in_list(struct list_head *old, struct list_head *latest); ref->member.next, &ref->member != (head); \ ref = list_entry(ref->member.next, typeof(*ref), member)) +#define list_for_each_entry_safe(pos, n, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member), \ + n = list_entry(pos->member.next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, typeof(*n), member)) + +#define list_for_each_safe(pos, n, head) \ + for (pos = (head)->next, n = pos->next; pos != (head); \ + pos = n, n = pos->next) + #endif |