diff options
Diffstat (limited to 'sound/oss/sequencer.c')
| -rw-r--r-- | sound/oss/sequencer.c | 22 | 
1 files changed, 7 insertions, 15 deletions
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c index 4ff60a6427d..c0eea1dfe90 100644 --- a/sound/oss/sequencer.c +++ b/sound/oss/sequencer.c @@ -19,6 +19,7 @@  #include "sound_config.h"  #include "midi_ctrl.h" +#include "sleep.h"  static int      sequencer_ok;  static struct sound_timer_operations *tmr; @@ -100,8 +101,7 @@ int sequencer_read(int dev, struct file *file, char __user *buf, int count)    			return -EAGAIN;    		} - 		interruptible_sleep_on_timeout(&midi_sleeper, -					       pre_event_timeout); +		oss_broken_sleep_on(&midi_sleeper, pre_event_timeout);  		spin_lock_irqsave(&lock,flags);  		if (!iqlen)  		{ @@ -216,8 +216,6 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun  	dev = dev >> 4; -	DEB(printk("sequencer_write(dev=%d, count=%d)\n", dev, count)); -  	if (mode == OPEN_READ)  		return -EIO; @@ -343,7 +341,7 @@ static int seq_queue(unsigned char *note, char nonblock)  		/*  		 * Sleep until there is enough space on the queue  		 */ -		interruptible_sleep_on(&seq_sleeper); +		oss_broken_sleep_on(&seq_sleeper, MAX_SCHEDULE_TIMEOUT);  	}  	if (qlen >= SEQ_MAX_QUEUE)  	{ @@ -959,8 +957,6 @@ int sequencer_open(int dev, struct file *file)  	dev = dev >> 4;  	mode = translate_mode(file); -	DEB(printk("sequencer_open(dev=%d)\n", dev)); -  	if (!sequencer_ok)  	{  /*		printk("Sound card: sequencer not initialized\n");*/ @@ -1122,8 +1118,7 @@ static void seq_drain_midi_queues(void)  		 */   		if (n) - 			interruptible_sleep_on_timeout(&seq_sleeper, -						       HZ/10); +			oss_broken_sleep_on(&seq_sleeper, HZ/10);  	}  } @@ -1134,8 +1129,6 @@ void sequencer_release(int dev, struct file *file)  	dev = dev >> 4; -	DEB(printk("sequencer_release(dev=%d)\n", dev)); -  	/*  	 * Wait until the queue is empty (if we don't have nonblock)  	 */ @@ -1145,8 +1138,7 @@ void sequencer_release(int dev, struct file *file)  		while (!signal_pending(current) && qlen > 0)  		{    			seq_sync(); - 			interruptible_sleep_on_timeout(&seq_sleeper, -						       3*HZ); +			oss_broken_sleep_on(&seq_sleeper, 3*HZ);   			/* Extra delay */  		}  	} @@ -1201,7 +1193,7 @@ static int seq_sync(void)  		seq_startplay();   	if (qlen > 0) - 		interruptible_sleep_on_timeout(&seq_sleeper, HZ); +		oss_broken_sleep_on(&seq_sleeper, HZ);  	return qlen;  } @@ -1224,7 +1216,7 @@ static void midi_outc(int dev, unsigned char data)  	spin_lock_irqsave(&lock,flags);   	while (n && !midi_devs[dev]->outputc(dev, data)) { - 		interruptible_sleep_on_timeout(&seq_sleeper, HZ/25); +		oss_broken_sleep_on(&seq_sleeper, HZ/25);    		n--;    	}  	spin_unlock_irqrestore(&lock,flags);  | 
