driver API

/* * When we convert to jiffies then we interpret incoming values * the following way: * * - negative values mean 'infinite timeout' (MAX_JIFFY_OFFSET) * * - 'too large' values [that would result in larger than * MAX_JIFFY_OFFSET values] mean 'infinite timeout' too. * * - all other values are converted to jiffies by either multiplying * the input value by a factor or dividing it with a factor * * We must also be careful about 32-bit overflows. */ unsigned long msecs_to_jiffies(const unsigned int m) { /*统一时间*/ } 

 

#define INIT_DELAYED_WORK(_work, _func) / do { / INIT_WORK(&(_work)->work, (_func)); / init_timer(&(_work)->timer); / } while (0) int schedule_delayed_work(struct delayed_work *dwork, unsigned long delay) { return queue_delayed_work(keventd_wq, dwork, delay); } EXPORT_SYMBOL(schedule_delayed_work); workqueue.h/workqueue.c /*all workqueue and schedule oper 

你可能感兴趣的:(driver API)