Skip to contentSkip to conversation

prism54/islpci_dev: replace schedule_timeout() with msleep()

PATCH Margit Schubert-While 1 participant 1 message Sep 2, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

On Thu, 02 Sep 2004, Maximilian scribeth:

Quoted 1 line

you didn't answer to the unit argument in favour of msleep.

Don't need to, here's msleep -
void msleep(unsigned int msecs)

{
        unsigned long timeout = msecs_to_jiffies(msecs);

        while (timeout) {
                set_current_state(TASK_UNINTERRUPTIBLE);
                timeout = schedule_timeout(timeout);
        }
}

In other words, with the subtle exception of the while loop, it reconstitutes the original code.
(Although m_to_j doesn't even exactly do that) (And note because of the while loop, this may not be
what the author intended)

Quoted 1 line

shure msleep is also consistent and documented.

grep -r Documentation = Nix

Margit