看板
[ LinuxDev ]
討論串[問題] 關於 schedule_timeout 的用法
共 4 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
可是我之前寫的版本是像這樣:. unsigned long timeout = jiffies + (5*HZ);. while (1). {. if (time_after(jiffies, timeout)). {. printk(KERN_ALERT "Hello, world after 5
(還有116個字)
內容預覽:
請教一下大家,我想在五秒之後 printk 一段訊息,. 但是聽說用 busy wait 方式不好,所以可以用 schedule_timeout. 我寫一段 hello.c 如下,希望在 insmod hello.ko 後五秒能在 dmesg 看到訊息. 這是寫在 module_init 的 fun
(還有49個字)
首頁
上一頁
1
下一頁
尾頁