Skip to content

Commit 4db5774

Browse files
committed
distinguish SMP mode
1 parent 7b4b253 commit 4db5774

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/thread.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,9 @@ rt_err_t rt_thread_resume(rt_thread_t thread)
884884
{
885885
rt_base_t level;
886886
rt_err_t result = RT_EOK;
887+
#ifndef RT_USING_SMP
887888
extern rt_uint8_t rt_current_priority;
889+
#endif
888890
/* parameter check */
889891
RT_ASSERT(thread != RT_NULL);
890892
RT_ASSERT(rt_object_get_type((rt_object_t)thread) == RT_Object_Class_Thread);
@@ -910,6 +912,7 @@ rt_err_t rt_thread_resume(rt_thread_t thread)
910912
/* insert to schedule ready list */
911913
rt_schedule_insert_thread(thread);
912914

915+
#ifndef RT_USING_SMP
913916
/* compare the priority with rt_current_priority*/
914917
if(thread->current_priority < rt_current_priority)
915918
{
@@ -919,6 +922,7 @@ rt_err_t rt_thread_resume(rt_thread_t thread)
919922
{
920923
result = RT_EBUSY;
921924
}
925+
#endif
922926

923927
/* enable interrupt */
924928
rt_hw_interrupt_enable(level);

0 commit comments

Comments
 (0)