Some applications need to save LLEXT context, e.g. when suspending, to later restore it quickly without a full relinking. Add 2 functions for context saving and restoring. Since these functions are likely to change in the future, put them in llext_experimental.c, which depends on CONFIG_LLEXT_EXPERIMENTAL and is disabled by default. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
26 lines
634 B
CMake
26 lines
634 B
CMake
if(CONFIG_LLEXT)
|
|
zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/llext/llext.h)
|
|
|
|
zephyr_library()
|
|
|
|
# For strnlen()
|
|
zephyr_library_compile_definitions(-D_POSIX_C_SOURCE=200809L)
|
|
|
|
zephyr_library_sources(
|
|
llext.c
|
|
llext_mem.c
|
|
llext_load.c
|
|
llext_link.c
|
|
llext_export.c
|
|
llext_handlers.c
|
|
buf_loader.c
|
|
fs_loader.c
|
|
)
|
|
zephyr_library_sources_ifdef(CONFIG_LLEXT_SHELL shell.c)
|
|
zephyr_library_sources_ifdef(CONFIG_LLEXT_EXPERIMENTAL llext_experimental.c)
|
|
|
|
if(CONFIG_RISCV AND CONFIG_USERSPACE)
|
|
message(WARNING "Running LLEXT extensions from user-space threads on RISC-V is not supported!")
|
|
endif()
|
|
endif()
|