PIXNET Logo登入

心的距離

跳到主文

Google
Custom Search

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 5月 23 週一 201113:53
  • Small Delay

udelay & mdelay
driver常常會需要很短且精準的delay(n microsecond/millisecond),以完成sync。此時用jiffies就不恰當,第一單位不夠小,如果timer是100Hz,表示一個tick是10 millisecond。第二不夠準,因為透過scheduler。在kernel裡有兩個function來完成很小的delay,不使用jiffies:

在<linux/delay.h>
(繼續閱讀...)
文章標籤

kezeodsnx 發表在 痞客邦 留言(0) 人氣(8,889)

  • 個人分類:kernel
▲top
  • 5月 23 週一 201109:31
  • Kernel Korner - Sleeping in the Kernel

原文: Sleeping in the Kernel
在多處理器(SMP)和hyperthreading的時代,sleep_on()這個function已經無法保證其可靠性了。以下為讓一個process安全以及跨平台的sleep方式。
Linux kernel有好些時候一個process會需要wait,直到某些事情發生,或是process需要醒來做一些事情。
(繼續閱讀...)
文章標籤

kezeodsnx 發表在 痞客邦 留言(1) 人氣(6,390)

  • 個人分類:kernel
▲top
1

文章搜尋

廣告版面

廣告版面

參觀人氣

  • 本日人氣:
  • 累積人氣:

文章分類

toggle 生活 (4)
  • 高登鐵漢 (7)
  • 英文筆記 (0)
  • 愚蠢上班族 (12)
  • 無病呻吟 (9)
toggle Linux (7)
  • kernel (2)
  • System (45)
  • Shell (8)
  • android (12)
  • C programming (15)
  • Multimedia (10)
  • Driver (27)
  • server (2)
  • wireless (7)
  • 有的沒的 (3)
  • 未分類文章 (1)

google analytics