(interruptible_)sleep_on_timeout question

Xiaogeng (Shawn) Jin xjin at redswitch.com
Fri May 24 12:25:33 EST 2002


Hi,

Is it possible to dynamically change the timeout value of
sleep_on_timeout()? I encountered a situation where the timeout value is
got from some interrupt handler, which will modify the value. For example,

main() {
/* the main process goes to sleep with a timeout */
....
interruptible_sleep_on_timeout(q, timeout);
....
}

int_handler() {
      /* If the interrupt happens before timeout, the handler
       * gets a new timeout value and makes the main process
       * continue to sleep.
       */
}

Is it possible to implement this mechanism? I thought about kernel timer
and variation of sleep_on_timeout(). But all seems to have some problems.

Thanks a lot.

Shawn.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list