Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 2026 21:42:47 +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-branches@FreeBSD.org
Subject:   git: f3fc80b1b2c4 - stable/15 - linuxkpi: Define `sort_r()`
Message-ID:  <69f27b57.46ced.7c85cd6b@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by dumbbell:

URL: https://cgit.FreeBSD.org/src/commit/?id=f3fc80b1b2c4eab259e6f610ac0a241b71b520f4

commit f3fc80b1b2c4eab259e6f610ac0a241b71b520f4
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-29 21:03:15 +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
    
    (cherry picked from commit 4dab15e96d40352e1a0b161a2a1cd763176108b6)
---
 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?69f27b57.46ced.7c85cd6b>