diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-01-02 07:07:51 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-01-14 10:12:07 -0500 |
commit | cdef2e5f358db5fd27eec4c72eb295c232287813 (patch) | |
tree | 83f0821da55eff4924b2947c29d8e2b87d302494 /sound/oss/sleep.h | |
parent | 1a1e0a80ceb766852e8abd5d4c3d9475611a7d85 (diff) |
sound: oss: remove last sleep_on users
There are three files in oss for which I could not find an easy way to
replace interruptible_sleep_on_timeout with a non-racy version. This
patch instead just adds a private implementation of the function, now
named oss_broken_sleep_on, and changes over the remaining users in
sound/oss/ so we can remove the global interface.
[fixed coding style warnings by tiwai]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/oss/sleep.h')
-rw-r--r-- | sound/oss/sleep.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/oss/sleep.h b/sound/oss/sleep.h new file mode 100644 index 000000000000..a20fc925a5ce --- /dev/null +++ b/sound/oss/sleep.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #include <linux/wait.h> | ||
2 | |||
3 | /* | ||
4 | * Do not use. This is a replacement for the old | ||
5 | * "interruptible_sleep_on_timeout" function that has been | ||
6 | * deprecated for ages. All users should instead try to use | ||
7 | * wait_event_interruptible_timeout. | ||
8 | */ | ||
9 | |||
10 | static inline long | ||
11 | oss_broken_sleep_on(wait_queue_head_t *q, long timeout) | ||
12 | { | ||
13 | DEFINE_WAIT(wait); | ||
14 | prepare_to_wait(q, &wait, TASK_INTERRUPTIBLE); | ||
15 | timeout = schedule_timeout(timeout); | ||
16 | finish_wait(q, &wait); | ||
17 | return timeout; | ||
18 | } | ||