HomeFreeBSD

linuxkpi: Define `DEFINE_XARRAY*()` macros

Description

linuxkpi: Define DEFINE_XARRAY*() macros

The DEFINE_XARRAY*() macros are used to declare a static xarray.

As the structure embeds a mutex(9), we also need to declare the static
mutex after the struct xarray. Thus the slightly awkward definition
of DEFINE_XARRAY_FLAGS().

The DRM generic code started to use DEFINE_XARRAY_ALLOC() in Linux
6.12.

Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56446

Details

Provenance
dumbbellAuthored on Apr 13 2026, 9:44 PM
Reviewer
bz
Differential Revision
D56446: linuxkpi: Define `DEFINE_XARRAY*()` macros
Parents
rG783d018cf954: linuxkpi: Add `struct xa_limit` support to xarray
Branches
Unknown
Tags
Unknown