Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/list.h
Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | |||||
#define list_for_each_safe(p, n, head) \ | #define list_for_each_safe(p, n, head) \ | ||||
for (p = (head)->next, n = (p)->next; p != (head); p = n, n = (p)->next) | for (p = (head)->next, n = (p)->next; p != (head); p = n, n = (p)->next) | ||||
#define list_for_each_entry(p, h, field) \ | #define list_for_each_entry(p, h, field) \ | ||||
for (p = list_entry((h)->next, typeof(*p), field); &(p)->field != (h); \ | for (p = list_entry((h)->next, typeof(*p), field); &(p)->field != (h); \ | ||||
p = list_entry((p)->field.next, typeof(*p), field)) | p = list_entry((p)->field.next, typeof(*p), field)) | ||||
#define list_for_each_entry_lockless(...) list_for_each_entry(__VA_ARGS__) | |||||
#define list_for_each_entry_safe(p, n, h, field) \ | #define list_for_each_entry_safe(p, n, h, field) \ | ||||
for (p = list_entry((h)->next, typeof(*p), field), \ | for (p = list_entry((h)->next, typeof(*p), field), \ | ||||
n = list_entry((p)->field.next, typeof(*p), field); &(p)->field != (h);\ | n = list_entry((p)->field.next, typeof(*p), field); &(p)->field != (h);\ | ||||
p = n, n = list_entry(n->field.next, typeof(*n), field)) | p = n, n = list_entry(n->field.next, typeof(*n), field)) | ||||
#define list_for_each_entry_from(p, h, field) \ | #define list_for_each_entry_from(p, h, field) \ | ||||
for ( ; &(p)->field != (h); \ | for ( ; &(p)->field != (h); \ | ||||
p = list_entry((p)->field.next, typeof(*p), field)) | p = list_entry((p)->field.next, typeof(*p), field)) | ||||
▲ Show 20 Lines • Show All 291 Lines • Show Last 20 Lines |