arch: Remove the special check for idle thread in up_use_stack

since the idle thread don't call up_use_stack anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-10-23 11:47:51 +08:00 committed by Masayuki Ishikawa
parent efee1c6ded
commit 625eef20f0
16 changed files with 23 additions and 71 deletions

View File

@ -156,11 +156,8 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
* water marks.
*/
if (tcb->pid != 0)
{
arm_stack_color((FAR void *)((uintptr_t)tcb->adj_stack_ptr -
tcb->adj_stack_size), tcb->adj_stack_size);
}
#endif /* CONFIG_STACK_COLORATION */
return OK;

View File

@ -111,10 +111,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
}
#endif
/* The AVR uses a push-down stack: the stack grows toward loweraddresses

View File

@ -111,10 +111,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
}
#endif
/* The AVR32 uses a push-down stack: the stack grows

View File

@ -110,10 +110,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* The CPU12 uses a push-down stack: the stack grows

View File

@ -131,10 +131,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* MIPS uses a push-down stack: the stack grows toward loweraddresses in

View File

@ -94,10 +94,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* The i486 uses a push-down stack: the stack grows toward loweraddresses

View File

@ -94,10 +94,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* The i486 uses a push-down stack: the stack grows toward loweraddresses

View File

@ -94,10 +94,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* The i486 uses a push-down stack: the stack grows toward loweraddresses

View File

@ -96,10 +96,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* The SH family uses a push-down stack: the stack grows toward lower

View File

@ -157,12 +157,9 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
* water marks.
*/
if (tcb->pid != 0)
{
up_stack_color((FAR void *)((uintptr_t)tcb->stack_alloc_ptr +
sizeof(struct tls_info_s)),
size_of_stack - sizeof(struct tls_info_s));
}
#endif
return OK;

View File

@ -136,12 +136,9 @@ int up_use_stack(FAR struct tcb_s *tcb, FAR void *stack, size_t stack_size)
* water marks.
*/
if (tcb->pid != 0)
{
up_stack_color((FAR void *)((uintptr_t)tcb->stack_alloc_ptr +
sizeof(struct tls_info_s)),
adj_stack_size - sizeof(struct tls_info_s));
}
#endif
return OK;

View File

@ -111,10 +111,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* The i486 uses a push-down stack: the stack grows toward loweraddresses

View File

@ -96,10 +96,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* The intel64 uses a push-down stack: the stack grows toward lower

View File

@ -150,12 +150,9 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
* water marks.
*/
if (tcb->pid != 0)
{
up_stack_color((FAR void *)((uintptr_t)tcb->stack_alloc_ptr +
sizeof(struct tls_info_s)),
size_of_stack - sizeof(struct tls_info_s));
}
#endif
return OK;

View File

@ -96,10 +96,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* The ZNEO uses a push-down stack: the stack grows toward lower

View File

@ -95,10 +95,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/
#ifdef CONFIG_STACK_COLORATION
if (tcb->pid != 0)
{
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
}
#endif
/* The Z80 uses a push-down stack: the stack grows toward lower