diff options
| author | Simon Glass <[email protected]> | 2024-07-30 08:39:37 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-08-07 08:49:10 -0600 |
| commit | 75581e419aa2bf5cc1b4c3ec79701017b44d1a66 (patch) | |
| tree | 3cb0c8ebdc4e2a4b00a22301b0fbddef47e0e186 /test/lib/Makefile | |
| parent | 947aafdebc9f64f12e8aa6ae7f60758f04bd1540 (diff) | |
alist: Add support for an allocated pointer list
In various places it is useful to have an array of structures, but allow
it to grow. In some cases we work around it by setting maximum number of
entries, using a Kconfig option. In other places we use a linked list,
which does not provide for random access and can complicate the code.
Introduce a new data structure, which is a variable-sized list of structs
each of the same, pre-set size. It provides O(1) access and is reasonably
efficient at expanding linearly, since it doubles in size when it runs out
of space.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'test/lib/Makefile')
| -rw-r--r-- | test/lib/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/lib/Makefile b/test/lib/Makefile index e75a263e6a4..70f14c46b1e 100644 --- a/test/lib/Makefile +++ b/test/lib/Makefile @@ -5,6 +5,7 @@ ifeq ($(CONFIG_SPL_BUILD),) obj-y += cmd_ut_lib.o obj-y += abuf.o +obj-y += alist.o obj-$(CONFIG_EFI_LOADER) += efi_device_path.o obj-$(CONFIG_EFI_SECURE_BOOT) += efi_image_region.o obj-y += hexdump.o |
