patch-2.1.127 linux/drivers/sound/midibuf.c
Next file: linux/drivers/sound/msnd_pinnacle.c
Previous file: linux/drivers/sound/maui.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Sat Oct 31 10:17:22 1998
- Orig file:
v2.1.126/linux/drivers/sound/midibuf.c
- Orig date:
Thu May 14 19:47:42 1998
diff -u --recursive --new-file v2.1.126/linux/drivers/sound/midibuf.c linux/drivers/sound/midibuf.c
@@ -90,11 +90,8 @@
if (midi_devs[dev]->buffer_status != NULL)
while (!signal_pending(current) && midi_devs[dev]->buffer_status(dev))
- {
- current->timeout = jiffies + HZ / 10;
- interruptible_sleep_on(&midi_sleeper[dev]);
- current->timeout = 0;
- }
+ interruptible_sleep_on_timeout(&midi_sleeper[dev],
+ HZ/10);
}
static void midi_input_intr(int dev, unsigned char data)
@@ -181,7 +178,7 @@
midi_input_intr, midi_output_intr)) < 0)
return err;
- parms[dev].prech_timeout = 0;
+ parms[dev].prech_timeout = MAX_SCHEDULE_TIMEOUT;
midi_in_buf[dev] = (struct midi_buf *) vmalloc(sizeof(struct midi_buf));
if (midi_in_buf[dev] == NULL)
@@ -325,9 +322,9 @@
if (!DATA_AVAIL(midi_in_buf[dev])) { /*
* No data yet, wait
*/
- current->timeout = parms[dev].prech_timeout ? jiffies + parms[dev].prech_timeout : 0;
- interruptible_sleep_on(&input_sleeper[dev]);
- current->timeout = 0;
+ interruptible_sleep_on_timeout(&input_sleeper[dev],
+ parms[dev].prech_timeout);
+
if (signal_pending(current))
c = -EINTR; /* The user is getting restless */
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov