diff options
author | Rene Herman <rene.herman@gmail.com> | 2007-09-18 12:33:15 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 10:50:55 -0400 |
commit | c929e5ef4f1b2ef52f707e7ffcedc492a199741e (patch) | |
tree | 2776f8feace84ef880d6e6a3a896b5bb507b5288 /sound | |
parent | d86d01935a4c4c818514d8c23579703abd768329 (diff) |
[ALSA] schedule_timeout() fix for core/seq/seq_instr.c
Replace schedule_timeout() with schedule_timeout_uninterruptible()
to avoid signals in loop.
Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/seq/seq_instr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/core/seq/seq_instr.c b/sound/core/seq/seq_instr.c index 5efe6523a589..08bed008fb7e 100644 --- a/sound/core/seq/seq_instr.c +++ b/sound/core/seq/seq_instr.c | |||
@@ -109,7 +109,7 @@ void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list_ptr) | |||
109 | spin_lock_irqsave(&list->lock, flags); | 109 | spin_lock_irqsave(&list->lock, flags); |
110 | while (instr->use) { | 110 | while (instr->use) { |
111 | spin_unlock_irqrestore(&list->lock, flags); | 111 | spin_unlock_irqrestore(&list->lock, flags); |
112 | schedule_timeout(1); | 112 | schedule_timeout_uninterruptible(1); |
113 | spin_lock_irqsave(&list->lock, flags); | 113 | spin_lock_irqsave(&list->lock, flags); |
114 | } | 114 | } |
115 | spin_unlock_irqrestore(&list->lock, flags); | 115 | spin_unlock_irqrestore(&list->lock, flags); |
@@ -198,8 +198,10 @@ int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list, | |||
198 | while (flist) { | 198 | while (flist) { |
199 | instr = flist; | 199 | instr = flist; |
200 | flist = instr->next; | 200 | flist = instr->next; |
201 | while (instr->use) | 201 | while (instr->use) { |
202 | schedule_timeout(1); | 202 | schedule_timeout_uninterruptible(1); |
203 | barrier(); | ||
204 | } | ||
203 | if (snd_seq_instr_free(instr, atomic)<0) | 205 | if (snd_seq_instr_free(instr, atomic)<0) |
204 | snd_printk(KERN_WARNING "instrument free problem\n"); | 206 | snd_printk(KERN_WARNING "instrument free problem\n"); |
205 | instr = next; | 207 | instr = next; |
@@ -555,7 +557,7 @@ static int instr_free(struct snd_seq_kinstr_ops *ops, | |||
555 | SNDRV_SEQ_INSTR_NOTIFY_REMOVE); | 557 | SNDRV_SEQ_INSTR_NOTIFY_REMOVE); |
556 | while (instr->use) { | 558 | while (instr->use) { |
557 | spin_unlock_irqrestore(&list->lock, flags); | 559 | spin_unlock_irqrestore(&list->lock, flags); |
558 | schedule_timeout(1); | 560 | schedule_timeout_uninterruptible(1); |
559 | spin_lock_irqsave(&list->lock, flags); | 561 | spin_lock_irqsave(&list->lock, flags); |
560 | } | 562 | } |
561 | spin_unlock_irqrestore(&list->lock, flags); | 563 | spin_unlock_irqrestore(&list->lock, flags); |