Hi Ronald,

> Can you explain some more to a relative scheduling newbie? Is the use of
> schedule_timeout() discouraged? Or is its use here wrong? And why
> exactly?

schedule_timeout() returns after the specified timeout, but can also be 
interrupted by a waitqueue event before the timeout even if the task state is 
TASK_UNINTERRUPTIBLE. msleep() sets the task state to TASK_UNINTERRUPTIBLE 
and calls schedule_timeout() repeatively until the given number of 
milliseconds have elapsed.

msleep should be used when waiting for a number of milliseconds, and 
schedule_timeout when waiting for an event (waitqueue) with a timeout.

Laurent Pinchart

Attachment: pgp0TzgKZjy6z.pgp
Description: signature

Reply via email to