add list_sort

This commit is contained in:
2023-12-29 17:22:28 +01:00
parent 97d6570be7
commit d654b4acde
3 changed files with 0 additions and 4 deletions

20
include/list_sort.h Normal file
View File

@@ -0,0 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Taken from linux kernel: lib/list_sort.c
*/
#ifndef _BR_LIST_SORT_H
#define _BR_LIST_SORT_H
//#include <linux/types.h>
struct list_head;
typedef int __attribute__((nonnull(2,3))) (*list_cmp_func_t)(void *,
const struct list_head *, const struct list_head *);
__attribute__((nonnull(2,3)))
void list_sort(void *priv, struct list_head *head, list_cmp_func_t cmp);
#endif /* _BR_LIST_SORT */