reduce change

This commit is contained in:
zhaohengbo 2018-12-15 20:27:38 +08:00
parent 0d1cc3565a
commit 10d00ff41c
1 changed files with 1 additions and 4 deletions

View File

@ -84,15 +84,12 @@ static void _rt_scheduler_stack_check(struct rt_thread *thread)
#if defined(ARCH_CPU_STACK_GROWS_UPWARD)
if (*((rt_uint8_t *)((rt_ubase_t)thread->stack_addr + thread->stack_size - 1)) != '#' ||
(rt_ubase_t)thread->sp <= (rt_ubase_t)thread->stack_addr ||
(rt_ubase_t)thread->sp >
(rt_ubase_t)thread->stack_addr + (rt_ubase_t)thread->stack_size)
#else
if (*((rt_uint8_t *)thread->stack_addr) != '#' ||
#endif
(rt_ubase_t)thread->sp <= (rt_ubase_t)thread->stack_addr ||
(rt_ubase_t)thread->sp >
(rt_ubase_t)thread->stack_addr + (rt_ubase_t)thread->stack_size)
#endif
{
rt_ubase_t level;