diff options
| author | shaojinchun <[email protected]> | 2019-05-10 10:36:19 +0800 |
|---|---|---|
| committer | shaojinchun <[email protected]> | 2019-05-11 09:35:17 +0800 |
| commit | 737d58fbb9516674939f08bd495fcba3ee2b73ba (patch) | |
| tree | 41f98d92e96744b5f936614f3cf2073d4b492dcc /src | |
| parent | 6cdfb2ac92d8422136f926024b2c2f969fce6b9e (diff) | |
修正_get_highest_priority_thread中对“是否只有idle可运行”判断位置的问题
Diffstat (limited to 'src')
| -rw-r--r-- | src/scheduler.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scheduler.c b/src/scheduler.c index 3da723687c..458d1e15c0 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -128,9 +128,9 @@ static struct rt_thread* _get_highest_priority_thread(rt_ubase_t *highest_prio) register struct rt_thread *highest_priority_thread; register rt_ubase_t highest_ready_priority, local_highest_ready_priority; struct rt_cpu* pcpu = rt_cpu_self(); - #if RT_THREAD_PRIORITY_MAX > 32 register rt_ubase_t number; +#endif if (rt_thread_ready_priority_group == 0 && pcpu->priority_group == 0) { @@ -139,6 +139,7 @@ static struct rt_thread* _get_highest_priority_thread(rt_ubase_t *highest_prio) return pcpu->current_thread; } +#if RT_THREAD_PRIORITY_MAX > 32 number = __rt_ffs(rt_thread_ready_priority_group) - 1; highest_ready_priority = (number << 3) + __rt_ffs(rt_thread_ready_table[number]) - 1; number = __rt_ffs(pcpu->priority_group) - 1; |
