linuxkpi: Add list_is_first function
This function just test if the element is the first of the list. Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23766
This commit is contained in:
parent
4d46287a8f
commit
df7aea4cf7
@ -449,6 +449,13 @@ static inline void list_cut_position(struct list_head *list,
|
||||
__list_cut_position(list, head, entry);
|
||||
}
|
||||
|
||||
static inline int list_is_first(const struct list_head *list,
|
||||
const struct list_head *head)
|
||||
{
|
||||
|
||||
return (list->prev == head);
|
||||
}
|
||||
|
||||
static inline int list_is_last(const struct list_head *list,
|
||||
const struct list_head *head)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user