summaryrefslogtreecommitdiff
path: root/firmware/kernel/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/kernel/thread.c')
-rw-r--r--firmware/kernel/thread.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/firmware/kernel/thread.c b/firmware/kernel/thread.c
index 5bb6eb5522..c148f6b76e 100644
--- a/firmware/kernel/thread.c
+++ b/firmware/kernel/thread.c
@@ -189,10 +189,6 @@ void switch_thread(void)
189#include "thread-pp.c" 189#include "thread-pp.c"
190#endif /* CPU_PP */ 190#endif /* CPU_PP */
191 191
192#ifndef IF_NO_SKIP_YIELD
193#define IF_NO_SKIP_YIELD(...)
194#endif
195
196/* 192/*
197 * End Processor-specific section 193 * End Processor-specific section
198 ***************************************************************************/ 194 ***************************************************************************/
@@ -1014,8 +1010,7 @@ unsigned int wakeup_thread_(struct thread_entry **list
1014 { 1010 {
1015 /* No PIP - just boost the thread by aging */ 1011 /* No PIP - just boost the thread by aging */
1016#ifdef HAVE_PRIORITY_SCHEDULING 1012#ifdef HAVE_PRIORITY_SCHEDULING
1017 IF_NO_SKIP_YIELD( if (thread->skip_count != -1) ) 1013 thread->skip_count = thread->priority;
1018 thread->skip_count = thread->priority;
1019#endif /* HAVE_PRIORITY_SCHEDULING */ 1014#endif /* HAVE_PRIORITY_SCHEDULING */
1020 remove_from_list_l(list, thread); 1015 remove_from_list_l(list, thread);
1021 core_schedule_wakeup(thread); 1016 core_schedule_wakeup(thread);
@@ -1303,9 +1298,8 @@ void switch_thread(void)
1303#endif 1298#endif
1304 1299
1305#ifdef HAVE_PRIORITY_SCHEDULING 1300#ifdef HAVE_PRIORITY_SCHEDULING
1306 IF_NO_SKIP_YIELD( if (thread->skip_count != -1) )
1307 /* Reset the value of thread's skip count */ 1301 /* Reset the value of thread's skip count */
1308 thread->skip_count = 0; 1302 thread->skip_count = 0;
1309#endif 1303#endif
1310 1304
1311 for (;;) 1305 for (;;)
@@ -1365,7 +1359,6 @@ void switch_thread(void)
1365 * processes aging; they must give up the processor by going 1359 * processes aging; they must give up the processor by going
1366 * off the run list. */ 1360 * off the run list. */
1367 if (LIKELY(priority <= max) || 1361 if (LIKELY(priority <= max) ||
1368 IF_NO_SKIP_YIELD( thread->skip_count == -1 || )
1369 (priority > PRIORITY_REALTIME && 1362 (priority > PRIORITY_REALTIME &&
1370 (diff = priority - max, 1363 (diff = priority - max,
1371 ++thread->skip_count > diff*diff))) 1364 ++thread->skip_count > diff*diff)))