]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
LinuxKPI: Add ida_alloc_min()
authorVladimir Kondratyev <wulf@FreeBSD.org>
Sun, 24 Dec 2023 08:19:59 +0000 (11:19 +0300)
committerVladimir Kondratyev <wulf@FreeBSD.org>
Sun, 24 Dec 2023 08:19:59 +0000 (11:19 +0300)
commitc7312643b7e5f01adc2a3094c5139f5dcab5f0a4
tree76cb42275346d6df0e566b8d3c794790f3bc41f9
parentaf787b8e8b803dbb2c6bd06629974ba39bd0fb70
LinuxKPI: Add ida_alloc_min()

ida_alloc_min() allocates an unused ID. between min and INT_MAX.

While here allow end parameter of ida_simple_get() be larger than
INT_MAX. Linux caps the value to INT_MAX.

Sponsored by: Serenity Cyber Security, LLC
Reviewers: manu, bz
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42806
sys/compat/linuxkpi/common/include/linux/idr.h
sys/compat/linuxkpi/common/src/linux_idr.c