[問題] wake_up_interruptible 是否要加lock
借一下這個連結的例子
http://bbs.chinaunix.net/forum.php?mod=viewthread&action=printable&tid=784492
{u32 i;
u16 *buff1;
u32 *buff2;
buff2=kmalloc(128,GFP_KERNEL);
wait_event_interruptible(wq,flags!=0);
..............................
}
在中断处理函数中
{
printk("interrupt 5 is working\n");
flags=1;
wake_up_interruptible(&wq);
}
請問在這情況下 flag=1和wake_up_interruptible是否需要用spin lock包起來呢??
--
http://blog.carlcarl.tw
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.184.171
→
04/30 00:26, , 1F
04/30 00:26, 1F
→
04/30 12:56, , 2F
04/30 12:56, 2F
→
04/30 12:56, , 3F
04/30 12:56, 3F
→
05/01 00:10, , 4F
05/01 00:10, 4F
推
05/01 00:10, , 5F
05/01 00:10, 5F
→
05/01 23:01, , 6F
05/01 23:01, 6F
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章