如果代码如下
- void test(void)
- {
- spin_lock_irqsave(&lock1,flag);
- ...
- func1();
- ...
- spin_unlock_irqrestore(&lock1,flag);
- }
- void func1(void)
- {
- spin_lock_irqsave(&lock2,flag);
- ...
- spin_unlock_irqrestore(&lock2,flag);
- }
代码会有任何问题吗?当在func1中调用spin_unlock_irqrestore时,是否已启用中断?我想要实现的是test()例程可以在没有调度程序或中断的任何中断的情况下执行.非常感谢