提交 d8695085 编写于 作者: B bernard

Merge branch 'master' of https://github.com/RT-Thread/rt-thread

...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* Date Author Notes * Date Author Notes
*/ */
#include <string.h>
#include "mqueue.h" #include "mqueue.h"
#include "pthread_internal.h" #include "pthread_internal.h"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
*/ */
#include <rtthread.h> #include <rtthread.h>
#include <string.h>
#include "semaphore.h" #include "semaphore.h"
#include "pthread_internal.h" #include "pthread_internal.h"
......
...@@ -226,10 +226,12 @@ void rt_schedule(void) ...@@ -226,10 +226,12 @@ void rt_schedule(void)
/* switch to new thread */ /* switch to new thread */
RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, RT_DEBUG_LOG(RT_DEBUG_SCHEDULER,
("[%d]switch to priority#%d thread:%s\n", ("[%d]switch to priority#%d "
rt_interrupt_nest, "thread:%.*s(sp:0x%p), "
highest_ready_priority, "from thread:%.*s(sp: 0x%p)\n",
to_thread->name)); rt_interrupt_nest, highest_ready_priority,
RT_NAME_MAX, to_thread->name, to_thread->sp,
RT_NAME_MAX, from_thread->name, from_thread->sp));
#ifdef RT_USING_OVERFLOW_CHECK #ifdef RT_USING_OVERFLOW_CHECK
_rt_scheduler_stack_check(to_thread); _rt_scheduler_stack_check(to_thread);
...@@ -279,11 +281,12 @@ void rt_schedule_insert_thread(struct rt_thread *thread) ...@@ -279,11 +281,12 @@ void rt_schedule_insert_thread(struct rt_thread *thread)
/* set priority mask */ /* set priority mask */
#if RT_THREAD_PRIORITY_MAX <= 32 #if RT_THREAD_PRIORITY_MAX <= 32
RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("insert thread[%s], the priority: %d\n", RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("insert thread[%.*s], the priority: %d\n",
thread->name, thread->current_priority)); RT_NAME_MAX, thread->name, thread->current_priority));
#else #else
RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, RT_DEBUG_LOG(RT_DEBUG_SCHEDULER,
("insert thread[%s], the priority: %d 0x%x %d\n", ("insert thread[%.*s], the priority: %d 0x%x %d\n",
RT_NAME_MAX,
thread->name, thread->name,
thread->number, thread->number,
thread->number_mask, thread->number_mask,
...@@ -316,11 +319,13 @@ void rt_schedule_remove_thread(struct rt_thread *thread) ...@@ -316,11 +319,13 @@ void rt_schedule_remove_thread(struct rt_thread *thread)
temp = rt_hw_interrupt_disable(); temp = rt_hw_interrupt_disable();
#if RT_THREAD_PRIORITY_MAX <= 32 #if RT_THREAD_PRIORITY_MAX <= 32
RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("remove thread[%s], the priority: %d\n", RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("remove thread[%.*s], the priority: %d\n",
thread->name, thread->current_priority)); RT_NAME_MAX, thread->name,
thread->current_priority));
#else #else
RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, RT_DEBUG_LOG(RT_DEBUG_SCHEDULER,
("remove thread[%s], the priority: %d 0x%x %d\n", ("remove thread[%.*s], the priority: %d 0x%x %d\n",
RT_NAME_MAX,
thread->name, thread->name,
thread->number, thread->number,
thread->number_mask, thread->number_mask,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册