Refine __KERNEL__ and CONFIG_BUILD_xxx usage in the code base

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-04-30 03:21:23 +08:00
committed by Alan Carvalho de Assis
parent fe5cb9529d
commit eca7059785
83 changed files with 158 additions and 339 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
* then create a zeroed stack to make stack dumps easier to trace.
*/
#if defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
#ifdef CONFIG_MM_KERNEL_HEAP
/* Use the kernel allocator if this is a kernel thread */
if (ttype == TCB_FLAG_TTYPE_KERNEL)
+1 -1
View File
@@ -81,7 +81,7 @@ void up_release_stack(FAR struct tcb_s *dtcb, uint8_t ttype)
if (dtcb->stack_alloc_ptr)
{
#if defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_MM_KERNEL_HEAP)
#ifdef CONFIG_MM_KERNEL_HEAP
/* Use the kernel allocator if this is a kernel thread */
if (ttype == TCB_FLAG_TTYPE_KERNEL)