smp: move a preprocessor conditional from .c to cmake
smp.c only has to be built if CONFIG_SMP is enabled. Remove preprocessor checks from the file itself and update cmake rules instead. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
deb57e3b85
commit
ced7866901
2 changed files with 6 additions and 4 deletions
|
@ -27,10 +27,15 @@ list(APPEND kernel_files
|
||||||
stack.c
|
stack.c
|
||||||
system_work_q.c
|
system_work_q.c
|
||||||
work.c
|
work.c
|
||||||
smp.c
|
|
||||||
sched.c
|
sched.c
|
||||||
condvar.c
|
condvar.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(CONFIG_SMP)
|
||||||
|
list(APPEND kernel_files
|
||||||
|
smp.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_XIP)
|
if(CONFIG_XIP)
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include <kswap.h>
|
#include <kswap.h>
|
||||||
#include <kernel_internal.h>
|
#include <kernel_internal.h>
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
static atomic_t global_lock;
|
static atomic_t global_lock;
|
||||||
static atomic_t start_flag;
|
static atomic_t start_flag;
|
||||||
|
|
||||||
|
@ -104,5 +103,3 @@ bool z_smp_cpu_mobile(void)
|
||||||
arch_irq_unlock(k);
|
arch_irq_unlock(k);
|
||||||
return !pinned;
|
return !pinned;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_SMP */
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue