fix compiling issue when RT_USING_HEAP is not defined.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1149 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
1e5518ee84
commit
30967678b1
|
@ -27,9 +27,7 @@ static struct rt_thread idle;
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
ALIGN(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t rt_thread_stack[IDLE_THREAD_STACK_SIZE];
|
static rt_uint8_t rt_thread_stack[IDLE_THREAD_STACK_SIZE];
|
||||||
|
|
||||||
#ifdef RT_USING_HEAP
|
|
||||||
extern rt_list_t rt_thread_defunct;
|
extern rt_list_t rt_thread_defunct;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_HOOK
|
#ifdef RT_USING_HOOK
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +58,6 @@ void rt_thread_idle_sethook(void (*hook)())
|
||||||
*/
|
*/
|
||||||
void rt_thread_idle_excute(void)
|
void rt_thread_idle_excute(void)
|
||||||
{
|
{
|
||||||
#ifdef RT_USING_HEAP
|
|
||||||
/* check the defunct thread list */
|
/* check the defunct thread list */
|
||||||
if (!rt_list_isempty(&rt_thread_defunct))
|
if (!rt_list_isempty(&rt_thread_defunct))
|
||||||
{
|
{
|
||||||
|
@ -113,6 +110,7 @@ void rt_thread_idle_excute(void)
|
||||||
/* enable interrupt */
|
/* enable interrupt */
|
||||||
rt_hw_interrupt_enable(lock);
|
rt_hw_interrupt_enable(lock);
|
||||||
|
|
||||||
|
#ifdef RT_USING_HEAP
|
||||||
#ifdef RT_USING_MODULE
|
#ifdef RT_USING_MODULE
|
||||||
/* the thread belongs to an application module */
|
/* the thread belongs to an application module */
|
||||||
if(thread->flags & RT_OBJECT_FLAG_MODULE)
|
if(thread->flags & RT_OBJECT_FLAG_MODULE)
|
||||||
|
@ -138,9 +136,9 @@ void rt_thread_idle_excute(void)
|
||||||
/* unload module */
|
/* unload module */
|
||||||
if(module->nref == 0) rt_module_unload(module);
|
if(module->nref == 0) rt_module_unload(module);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void rt_thread_idle_entry(void* parameter)
|
static void rt_thread_idle_entry(void* parameter)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,9 +48,7 @@ rt_uint8_t rt_thread_ready_table[32];
|
||||||
rt_uint32_t rt_thread_ready_priority_group;
|
rt_uint32_t rt_thread_ready_priority_group;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_HEAP
|
|
||||||
rt_list_t rt_thread_defunct;
|
rt_list_t rt_thread_defunct;
|
||||||
#endif
|
|
||||||
|
|
||||||
const rt_uint8_t rt_lowest_bitmap[] =
|
const rt_uint8_t rt_lowest_bitmap[] =
|
||||||
{
|
{
|
||||||
|
@ -106,6 +104,12 @@ static void _rt_scheduler_stack_check(struct rt_thread* thread)
|
||||||
rt_uint32_t level;
|
rt_uint32_t level;
|
||||||
|
|
||||||
rt_kprintf("thread:%s stack overflow\n", thread->name);
|
rt_kprintf("thread:%s stack overflow\n", thread->name);
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
{
|
||||||
|
extern long list_thread(void);
|
||||||
|
list_thread();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
level = rt_hw_interrupt_disable();
|
level = rt_hw_interrupt_disable();
|
||||||
while (level);
|
while (level);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,10 +31,7 @@
|
||||||
extern rt_list_t rt_thread_priority_table[RT_THREAD_PRIORITY_MAX];
|
extern rt_list_t rt_thread_priority_table[RT_THREAD_PRIORITY_MAX];
|
||||||
extern struct rt_thread* rt_current_thread;
|
extern struct rt_thread* rt_current_thread;
|
||||||
extern rt_uint8_t rt_current_priority;
|
extern rt_uint8_t rt_current_priority;
|
||||||
|
|
||||||
#ifdef RT_USING_HEAP
|
|
||||||
extern rt_list_t rt_thread_defunct;
|
extern rt_list_t rt_thread_defunct;
|
||||||
#endif
|
|
||||||
|
|
||||||
static void rt_thread_exit(void);
|
static void rt_thread_exit(void);
|
||||||
void rt_thread_timeout(void* parameter);
|
void rt_thread_timeout(void* parameter);
|
||||||
|
|
Loading…
Reference in New Issue