8. linux 内核延时相关API
- 短延时(忙等)
void ndelay(unsigned long nsecs);
void udelay(unsigned long usecs);
void mdelay(unsigned long msecs);
- 长延时(忙等)
void msleep(unsigned int millisecs);
unsigned long msleep_interruptible(unsigned int millisecs);
void ssleep(unsigned int seconds);
- 睡着延时
//输入是 jiffies 的增量
schedule_timeout_uninterruptible(int timeout);
schedule_timeout_interruptible(int timeout);