- 论坛徽章:
- 0
|
humjb_1983 发表于 2014-06-17 11:06 ![]()
再看了下代码,更正下我之前的说法,在preempt_disable之后,如果进程不主动调度的话,应该不会调度到其它进 ...
同意楼主的看法,设置preempt_disalbe后,系统是不会再被调度了。
arm架构的主调度器也是优先判断这个preempt_count计数。
__irq_svc:
svc_entry
irq_handler
#ifdef CONFIG_PREEMPT
get_thread_info tsk
ldr r8, [tsk, #TI_PREEMPT] @ get preempt count
ldr r0, [tsk, #TI_FLAGS] @ get flags
teq r8, #0 @ if preempt count != 0
movne r0, #0 @ force flags to 0
tst r0, #_TIF_NEED_RESCHED
blne svc_preempt
#endif
svc_exit r5, irq = 1 @ return from exception
UNWIND(.fnend )
ENDPROC(__irq_svc)
谢谢humjb_1983 |
|