aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2020-10-15 20:11:31 -0700
committerLinus Torvalds <[email protected]>2020-10-16 11:11:20 -0700
commite130816164e244b692921de49771eeb28205152d (patch)
treefcc0f3e2d2e7fb16ee11a9de20d8d842e9766041 /scripts/gdb/linux/tasks.py
parent1d339638a954edce06ffcaa15d883d322e9e8291 (diff)
include/linux/list.h: add a macro to test if entry is pointing to the head
Add a macro to test if entry is pointing to the head of the list which is useful in cases like: list_for_each_entry(pos, &head, member) { if (cond) break; } if (list_entry_is_head(pos, &head, member)) return -ERRNO; that allows to avoid additional variable to be added to track if loop has not been stopped in the middle. While here, convert list_for_each_entry*() family of macros to use a new one. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Cezary Rojewski <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions