FIX: Revert thread.c and rtthread.h to previous version.
FIX: Abort handler will suspend current thread instead of terminate it. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@260 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
8a590215b6
commit
54453a0748
|
@ -112,7 +112,6 @@ rt_err_t rt_thread_control(rt_thread_t thread, rt_uint8_t cmd, void* arg);
|
|||
rt_err_t rt_thread_suspend(rt_thread_t thread);
|
||||
rt_err_t rt_thread_resume(rt_thread_t thread);
|
||||
void rt_thread_timeout(void* parameter);
|
||||
void rt_thread_exit(void);
|
||||
|
||||
/*
|
||||
* idle thread interface
|
||||
|
@ -176,7 +175,7 @@ void rt_free (void *ptr);
|
|||
void* rt_realloc(void *ptr, rt_size_t nbytes);
|
||||
void *rt_calloc(rt_size_t count, rt_size_t size);
|
||||
|
||||
void rt_memory_info(rt_uint32_t *total,
|
||||
void rt_memory_info(rt_uint32_t *total,
|
||||
rt_uint32_t *used,
|
||||
rt_uint32_t *max_used);
|
||||
|
||||
|
|
|
@ -36,11 +36,13 @@ void rt_hw_trap_fiq()
|
|||
{
|
||||
rt_kprintf("fast interrupt request\n");
|
||||
}
|
||||
|
||||
extern void rt_thread_exit(void);
|
||||
|
||||
extern struct rt_thread* rt_current_thread;
|
||||
void rt_hw_trap_abort()
|
||||
{
|
||||
rt_thread_exit();
|
||||
rt_kprintf("Abort occured, thread terminated.\n");
|
||||
{
|
||||
rt_kprintf("Abort occured!!! Thread [%s] suspended.\n",rt_current_thread->name);
|
||||
rt_thread_suspend(rt_current_thread);
|
||||
rt_schedule();
|
||||
|
||||
}
|
||||
/*@}*/
|
||||
|
|
|
@ -34,6 +34,7 @@ extern rt_uint8_t rt_current_priority;
|
|||
extern rt_list_t rt_thread_defunct;
|
||||
#endif
|
||||
|
||||
static void rt_thread_exit(void);
|
||||
void rt_thread_timeout(void* parameter);
|
||||
|
||||
static rt_err_t _rt_thread_init(struct rt_thread* thread,
|
||||
|
@ -222,7 +223,7 @@ rt_err_t rt_thread_startup (rt_thread_t thread)
|
|||
return RT_EOK;
|
||||
}
|
||||
|
||||
void rt_thread_exit()
|
||||
static void rt_thread_exit()
|
||||
{
|
||||
struct rt_thread* thread;
|
||||
register rt_base_t temp;
|
||||
|
|
Loading…
Reference in New Issue