kernel: select work queue implementation

Attempts to reimplement the existing work API using a new work
implementation failed, primarily due to heavy use of whitebox testing
in validating the original API.  Add a temporary Kconfig that will
select between the two implementations so we can use the same
identifiers but select which implementation they reference.

This commit just adds the selection infrastructure and uses it to
conditionalize the existing implementation in anticipation of the new
one in the next commit.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-11-21 06:58:58 -06:00 committed by Anas Nashif
commit 44539ed645
5 changed files with 29 additions and 2 deletions

View file

@ -22,7 +22,6 @@ list(APPEND kernel_files
system_work_q.c
thread.c
version.c
work_q.c
condvar.c
smp.c
banner.c
@ -37,6 +36,7 @@ add_library(kernel ${kernel_files})
# Kernel files has the macro __ZEPHYR_SUPERVISOR__ set so that it
# optimizes the code when userspace is enabled.
set_target_properties(
kernel
PROPERTIES
@ -44,6 +44,8 @@ set_target_properties(
__ZEPHYR_SUPERVISOR__
)
target_sources_ifdef(CONFIG_KERNEL_WORK1 kernel PRIVATE work_q.c)
target_sources_ifdef(CONFIG_STACK_CANARIES kernel PRIVATE compiler_stack_protect.c)
target_sources_ifdef(CONFIG_SYS_CLOCK_EXISTS kernel PRIVATE timeout.c timer.c)
target_sources_ifdef(CONFIG_ATOMIC_OPERATIONS_C kernel PRIVATE atomic_c.c)