summaryrefslogtreecommitdiff
path: root/src/scheduler.c
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-06-14 23:59:42 +0000
committer[email protected] <[email protected]>2011-06-14 23:59:42 +0000
commitee68988518f8aa2b7cdafc2bcfe0abe6ad7df385 (patch)
treec673b27eee805e37c3c138e4e1d4c3596f985c9b /src/scheduler.c
parent99dc4465a66d757b1a94220b513d30e647861b4c (diff)
change the RT_DEBUG_NOT_REENT to RT_DEBUG_NOT_IN_INTERRUPT.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1503 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/scheduler.c')
-rw-r--r--src/scheduler.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/scheduler.c b/src/scheduler.c
index af85e282ab..e0567f4a5a 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -273,9 +273,7 @@ void rt_schedule()
(rt_module_t)rt_current_thread->module_id : RT_NULL);
#endif
-#ifdef RT_USING_HOOK
- RT_OBJECT_HOOK_CALL2(rt_scheduler_hook,from_thread, to_thread);
-#endif
+ RT_OBJECT_HOOK_CALL(rt_scheduler_hook, (from_thread, to_thread));
/* switch to new thread */
RT_DEBUG_LOG(RT_DEBUG_SCHEDULER,
@@ -328,13 +326,12 @@ void rt_schedule_insert_thread(struct rt_thread* thread)
&(thread->tlist));
/* set priority mask */
-#if RT_DEBUG_SCHEDULER
#if RT_THREAD_PRIORITY_MAX <= 32
- rt_kprintf("insert thread[%s], the priority: %d\n", thread->name, thread->current_priority);
+ RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("insert thread[%s], the priority: %d\n",
+ thread->name, thread->current_priority));
#else
- rt_kprintf("insert thread[%s], the priority: %d 0x%x %d\n", thread->name, thread->number, thread->number_mask, thread->high_mask);
-#endif
-
+ RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("insert thread[%s], the priority: %d 0x%x %d\n",
+ thread->name, thread->number, thread->number_mask, thread->high_mask));
#endif
#if RT_THREAD_PRIORITY_MAX > 32
@@ -362,14 +359,12 @@ void rt_schedule_remove_thread(struct rt_thread* thread)
/* disable interrupt */
temp = rt_hw_interrupt_disable();
-#if RT_DEBUG_SCHEDULER
#if RT_THREAD_PRIORITY_MAX <= 32
- rt_kprintf("remove thread[%s], the priority: %d\n", thread->name, thread->current_priority);
+ RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("remove thread[%s], the priority: %d\n",
+ thread->name, thread->current_priority));
#else
- rt_kprintf("remove thread[%s], the priority: %d 0x%x %d\n", thread->name, thread->number,
- thread->number_mask, thread->high_mask);
-#endif
-
+ RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("remove thread[%s], the priority: %d 0x%x %d\n",
+ thread->name, thread->number, thread->number_mask, thread->high_mask));
#endif
/* remove thread from ready list */