fix _rt_scheduler_stack_check
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@47 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
4bd258ce7b
commit
90238948ba
@ -18,6 +18,7 @@
|
|||||||
* 2006-08-03 Bernard add hook support
|
* 2006-08-03 Bernard add hook support
|
||||||
* 2006-09-05 Bernard add 32 priority level support
|
* 2006-09-05 Bernard add 32 priority level support
|
||||||
* 2006-09-24 Bernard add rt_system_scheduler_start function
|
* 2006-09-24 Bernard add rt_system_scheduler_start function
|
||||||
|
* 2009-09-16 Bernard fix _rt_scheduler_stack_check
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
@ -95,7 +96,9 @@ static void _rt_scheduler_stack_check(struct rt_thread* thread)
|
|||||||
{
|
{
|
||||||
RT_ASSERT(thread != RT_NULL);
|
RT_ASSERT(thread != RT_NULL);
|
||||||
|
|
||||||
if ((rt_uint32_t)thread->sp <= (rt_uint32_t)thread->stack_addr)
|
if ( (rt_uint32_t)thread->sp <= (rt_uint32_t)thread->stack_addr ||
|
||||||
|
(rt_uint32_t)thread->sp >
|
||||||
|
(rt_uint32_t)thread->stack_addr + (rt_uint32_t)thread->stack_size )
|
||||||
{
|
{
|
||||||
rt_uint32_t level;
|
rt_uint32_t level;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user