diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-16 10:29:08 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:24:50 -0500 |
commit | 1a60d4c5a0c4028559585a74e48593b16e1ca9b2 (patch) | |
tree | f03f8dfcd554f8ebbb295522dc46dfe4d110a484 /sound/core/pcm_native.c | |
parent | f0283f45a04d5cf31512e5e390a38504d97e7a97 (diff) |
[ALSA] semaphore -> mutex (core part)
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index f3d5de7b55a..ce1956a5528 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -2112,7 +2112,7 @@ static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) | |||
2112 | } | 2112 | } |
2113 | init_waitqueue_entry(&wait, current); | 2113 | init_waitqueue_entry(&wait, current); |
2114 | add_wait_queue(&pcm->open_wait, &wait); | 2114 | add_wait_queue(&pcm->open_wait, &wait); |
2115 | down(&pcm->open_mutex); | 2115 | mutex_lock(&pcm->open_mutex); |
2116 | while (1) { | 2116 | while (1) { |
2117 | err = snd_pcm_open_file(file, pcm, stream, &pcm_file); | 2117 | err = snd_pcm_open_file(file, pcm, stream, &pcm_file); |
2118 | if (err >= 0) | 2118 | if (err >= 0) |
@@ -2125,16 +2125,16 @@ static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) | |||
2125 | } else | 2125 | } else |
2126 | break; | 2126 | break; |
2127 | set_current_state(TASK_INTERRUPTIBLE); | 2127 | set_current_state(TASK_INTERRUPTIBLE); |
2128 | up(&pcm->open_mutex); | 2128 | mutex_unlock(&pcm->open_mutex); |
2129 | schedule(); | 2129 | schedule(); |
2130 | down(&pcm->open_mutex); | 2130 | mutex_lock(&pcm->open_mutex); |
2131 | if (signal_pending(current)) { | 2131 | if (signal_pending(current)) { |
2132 | err = -ERESTARTSYS; | 2132 | err = -ERESTARTSYS; |
2133 | break; | 2133 | break; |
2134 | } | 2134 | } |
2135 | } | 2135 | } |
2136 | remove_wait_queue(&pcm->open_wait, &wait); | 2136 | remove_wait_queue(&pcm->open_wait, &wait); |
2137 | up(&pcm->open_mutex); | 2137 | mutex_unlock(&pcm->open_mutex); |
2138 | if (err < 0) | 2138 | if (err < 0) |
2139 | goto __error; | 2139 | goto __error; |
2140 | return err; | 2140 | return err; |
@@ -2160,9 +2160,9 @@ static int snd_pcm_release(struct inode *inode, struct file *file) | |||
2160 | pcm = substream->pcm; | 2160 | pcm = substream->pcm; |
2161 | snd_pcm_drop(substream); | 2161 | snd_pcm_drop(substream); |
2162 | fasync_helper(-1, file, 0, &substream->runtime->fasync); | 2162 | fasync_helper(-1, file, 0, &substream->runtime->fasync); |
2163 | down(&pcm->open_mutex); | 2163 | mutex_lock(&pcm->open_mutex); |
2164 | snd_pcm_release_file(pcm_file); | 2164 | snd_pcm_release_file(pcm_file); |
2165 | up(&pcm->open_mutex); | 2165 | mutex_unlock(&pcm->open_mutex); |
2166 | wake_up(&pcm->open_wait); | 2166 | wake_up(&pcm->open_wait); |
2167 | module_put(pcm->card->module); | 2167 | module_put(pcm->card->module); |
2168 | snd_card_file_remove(pcm->card, file); | 2168 | snd_card_file_remove(pcm->card, file); |