timeout =interruptible_sleep_on_timeout(&adap->i2c_wait,/* I2C_SLEEP_TIMEOUT*/8);if( (8== timeout ) && ( adap->i2c_pending ==0) ) {for( count =0; count <1000; count ++ ) {if( adap->i2c_pending ==0) udelay(10) ;elsebreak; } } } adap->i2c_pending =0;// restore_...
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...
> atomic_inc(&ch->n_on_msg_allocate_wq); > - ret = interruptible_sleep_on_timeout(&ch->msg_allocate_wq, 1); > + prepare_to_wait(&ch->msg_allocate_wq, &wait, TASK_INTERRUPTIBLE); > + ret = schedule_timeout(1); > + finish_wait(&ch->msg_allocate_wq, &wait); > atomic_d...