kernel: Add k_mem_pool compatibility layer on top of k_heap

Add a shim layer implementing the legacy k_mem_pool APIs backed by a
k_heap instead of the original implementation.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2020-04-03 15:39:25 -07:00 committed by Andrew Boie
commit 8f0959c7b1
6 changed files with 115 additions and 2 deletions

View file

@ -12,7 +12,6 @@ add_library(kernel
mailbox.c
mem_slab.c
mempool.c
mempool_sys.c
msg_q.c
mutex.c
pipes.c
@ -42,6 +41,11 @@ target_sources_ifdef(CONFIG_SYS_CLOCK_EXISTS kernel PRIVATE timeout.c timer
target_sources_ifdef(CONFIG_ATOMIC_OPERATIONS_C kernel PRIVATE atomic_c.c)
target_sources_if_kconfig( kernel PRIVATE poll.c)
if(${CONFIG_MEM_POOL_HEAP_BACKEND})
else()
target_sources(kernel PRIVATE mempool_sys.c)
endif()
# The last 2 files inside the target_sources_ifdef should be
# userspace_handler.c and userspace.c. If not the linker would complain.
# This order has to be maintained. Any new file should be placed