![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PREEMPT
那颗流星
提炼升华
展开
-
__schedule分析
先看__schedule实现 /* * __schedule() is the main scheduler function. * * The main means of driving the scheduler and thus entering this function are: * * 1. Explicit blocking: mutex, semaphore,...原创 2019-12-10 19:30:04 · 805 阅读 · 0 评论 -
preempt_count分析
kernel通过preempt_count变量来判断是否处于中断(soft/hard/nmi)上下文,是否可以抢占,先看示例 #define in_irq() (hardirq_count()) #define hardirq_count() (preempt_count() & HARDIRQ_MASK) static __always_inline int preempt_cou...原创 2019-11-07 19:58:25 · 717 阅读 · 0 评论