linuxkpi: list_sort()'s callback now takes list arguments

This change breaks the API of `list_sort()`. `LINUXKPI_VERSION >= 51300`
is used to keep the header compatible with both versions of the
prototype.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D38082
This commit is contained in:
Jean-Sébastien Pédron 2023-01-11 23:22:07 +01:00
parent 5354596764
commit a83b3ec719
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC

View File

@ -504,7 +504,12 @@ static inline int list_is_last(const struct list_head *list,
(pos) && ({ n = (pos)->member.next; 1; }); \
pos = hlist_entry_safe(n, typeof(*(pos)), member))
#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51300
extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv,
const struct list_head *a, const struct list_head *b));
#else
extern void list_sort(void *priv, struct list_head *head, int (*cmp)(void *priv,
struct list_head *a, struct list_head *b));
#endif
#endif /* _LINUXKPI_LINUX_LIST_H_ */