Date: Tue, 21 Apr 2026 22:27:11 +0000 From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron <dumbbell@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 4dab15e96d40 - main - linuxkpi: Define `sort_r()` Message-ID: <69e7f9bf.36f63.3c5fa04d@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=4dab15e96d40352e1a0b161a2a1cd763176108b6 commit 4dab15e96d40352e1a0b161a2a1cd763176108b6 Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> AuthorDate: 2026-04-11 12:42:14 +0000 Commit: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> CommitDate: 2026-04-21 22:18:25 +0000 linuxkpi: Define `sort_r()` Like Linux `sort()` and FreeBSD `qsort()`, `sort_r()` is a wrapper around FreeBSD `qsort_r()`. The i915 DRM driver started to use it in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56437 --- sys/compat/linuxkpi/common/include/linux/sort.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sort.h b/sys/compat/linuxkpi/common/include/linux/sort.h index 361b37c587c8..972c8514e6fb 100644 --- a/sys/compat/linuxkpi/common/include/linux/sort.h +++ b/sys/compat/linuxkpi/common/include/linux/sort.h @@ -38,4 +38,9 @@ qsort(base, num, size, cmp); \ } while (0) +#define sort_r(base, num, size, cmp, swap, priv) do { \ + BUILD_BUG_ON(swap); \ + qsort_r(base, num, size, cmp, priv); \ +} while (0) + #endif /* _LINUXKPI_LINUX_SORT_H_ */home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e7f9bf.36f63.3c5fa04d>
