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:
parent
efee1c6ded
commit
625eef20f0
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user