1893EXPORT_SYMBOL(schedule_timeout_interruptible);18941895signedlong__sched schedule_timeout_killable(signedlongtimeout)1896{1897__set_current_state(TASK_KILLABLE);1898returnschedule_timeout(timeout);1899} 1900EXPORT_SYMBOL(schedule_timeout_killable);19011902signedlong__sched schedule_timeout_uninterruptibl...
staticintlog_worker(void*p){/* The thread should have never started */if(log_buf ==NULL)return-EFAULT;while(!kthread_should_stop()) {if(log_buf->write_pos == log_pos)schedule_timeout_interruptible(MAX_SCHEDULE_TIMEOUT);switch(log_buf->version) {case1: log_pos = process_v1log();...
schedule_timeout_interruptible, 在调用schedule之前,会先调用set_current_state设置进程状态,所以会将进程移出运行队列。从而达到降低CPU使用率的作用。 类似的还有: schedule_timeout_uninterruptible,schedule_timeout_killable
函数名称:We can use __set_current_state() here because schedule_timeout() calls* schedule() unconditionally. 函数原型:signed long __sched schedule_timeout_interruptible(signed long timeout) 返回类型:signed long 参数: 类型参数名称 signed long timeout 1914...
schedule_timeout interruptible_sleep_on_timeout. I made some experiements with both of them , and under a medium load (24Mbit) , it seems that the interruptible is more accurate. The schedule has deviation of several miliseconds every 50/100 samples (I totally took a batch of 150 sample...