diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2021-12-14 15:30:34 +0300 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2021-12-14 15:30:34 +0300 |
| commit | 09eb3ad55fef8d62edb74d5fe3a6720b6b467463 (patch) | |
| tree | ea7effcf055b12be234d0992110e464aa307520d /include/linux/delay.h | |
| parent | 60bf9b33c82c0e040a98272d7ff4f5a52e7469d6 (diff) | |
| parent | 94185adbfad56815c2c8401e16d81bdb74a79201 (diff) | |
| download | linux-09eb3ad55fef8d62edb74d5fe3a6720b6b467463.tar.xz | |
Merge branch 'irq/urgent' into irq/msi
to pick up the PCI/MSI-x fixes.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/delay.h')
| -rw-r--r-- | include/linux/delay.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/delay.h b/include/linux/delay.h index 8eacf67eb212..039e7e0c7378 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h @@ -20,6 +20,7 @@ */ #include <linux/math.h> +#include <linux/sched.h> extern unsigned long loops_per_jiffy; @@ -58,7 +59,18 @@ void calibrate_delay(void); void __attribute__((weak)) calibration_delay_done(void); void msleep(unsigned int msecs); unsigned long msleep_interruptible(unsigned int msecs); -void usleep_range(unsigned long min, unsigned long max); +void usleep_range_state(unsigned long min, unsigned long max, + unsigned int state); + +static inline void usleep_range(unsigned long min, unsigned long max) +{ + usleep_range_state(min, max, TASK_UNINTERRUPTIBLE); +} + +static inline void usleep_idle_range(unsigned long min, unsigned long max) +{ + usleep_range_state(min, max, TASK_IDLE); +} static inline void ssleep(unsigned int seconds) { |
