diff options
| author | 2006-09-19 01:56:44 -0400 | |
|---|---|---|
| committer | 2006-09-19 01:56:44 -0400 | |
| commit | 0612ec48762bf8712db1925b2e67246d2237ebab (patch) | |
| tree | 01b0d69c9c9915015c0f23ad4263646dd5413e99 /include/linux/list.h | |
| parent | Input: make input_register_handler() return error codes (diff) | |
| parent | x86: save/restore eflags in context switch (diff) | |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/list.h')
| -rw-r--r-- | include/linux/list.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index 6b74adf5297f..65a5b5ceda49 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -265,6 +265,17 @@ static inline void list_move_tail(struct list_head *list, } /** + * list_is_last - tests whether @list is the last entry in list @head + * @list: the entry to test + * @head: the head of the list + */ +static inline int list_is_last(const struct list_head *list, + const struct list_head *head) +{ + return list->next == head; +} + +/** * list_empty - tests whether a list is empty * @head: the list to test. */ |
