⑴ 如何使用spinlock要哪个头文件
在kernel2.4.20下面:
include <linux/spinlock.h>
spinlock_t mysiglock = SPIN_LOCK_UNLOCKED;
unsigned int flags;
然后:
spin_lock_irqsave(&mysiglock,flags);
spin_unlock_irqrestore(&mysiglock,flags);
可以编译,但连接的时候kernel.o时说:
undefined reference to 'local_irq_save'