1 /* SPDX-License-Identifier: GPL-2.0 */
3 * (C) 2022-2024 Kent Overstreet <kent.overstreet@linux.dev>
5 #ifndef _LINUX_DARRAY_TYpES_H
6 #define _LINUX_DARRAY_TYpES_H
8 #include <linux/types.h>
10 #define DARRAY_PREALLOCATED(_type, _nr) \
14 _type preallocated[_nr]; \
17 #define DARRAY(_type) DARRAY_PREALLOCATED(_type, 0)
19 typedef DARRAY(char) darray_char;
20 typedef DARRAY(char *) darray_str;
22 #endif /* _LINUX_DARRAY_TYpES_H */