发布时间:2012-12-24 10:39:00
项目需要,在驱动模块里用内核计时器timer_list实现了一个状态机。郁闷的是,运行时总报错“Scheduling while atomic”,网上搜了一下:"Scheduling while atomic" indicates that you've tried to sleep somewhere that you shouldn't - like within a spinlock-protected critical section or an interrupt handler.改进程序,在计时器里使用了workqueue,搞定问题。顺便把workqueue的实现代码总结了一下一、......【阅读全文】