Date: Thu, 20 Feb 2020 17:19:16 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358176 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <202002201719.01KHJGQ9055280@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Thu Feb 20 17:19:16 2020 New Revision: 358176 URL: https://svnweb.freebsd.org/changeset/base/358176 Log: 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 Modified: head/sys/compat/linuxkpi/common/include/linux/list.h Modified: head/sys/compat/linuxkpi/common/include/linux/list.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/list.h Thu Feb 20 17:10:25 2020 (r358175) +++ head/sys/compat/linuxkpi/common/include/linux/list.h Thu Feb 20 17:19:16 2020 (r358176) @@ -449,6 +449,13 @@ static inline void list_cut_position(struct list_head __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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002201719.01KHJGQ9055280>