patch-2.4.0-test9 linux/drivers/char/drm/gamma_dma.c
Next file: linux/drivers/char/drm/gamma_drv.c
Previous file: linux/drivers/char/drm/drmP.h
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Sun Oct 1 19:59:59 2000
- Orig file:
v2.4.0-test8/linux/drivers/char/drm/gamma_dma.c
- Orig date:
Tue Aug 29 21:09:10 2000
diff -u --recursive --new-file v2.4.0-test8/linux/drivers/char/drm/gamma_dma.c linux/drivers/char/drm/gamma_dma.c
@@ -542,10 +542,9 @@
if (d->flags & _DRM_DMA_BLOCK) {
DRM_DEBUG("%d waiting\n", current->pid);
- current->state = TASK_INTERRUPTIBLE;
for (;;) {
- if (!last_buf->waiting
- && !last_buf->pending)
+ current->state = TASK_INTERRUPTIBLE;
+ if (!last_buf->waiting && !last_buf->pending)
break; /* finished */
schedule();
if (signal_pending(current)) {
@@ -778,6 +777,7 @@
}
add_wait_queue(&dev->lock.lock_queue, &entry);
for (;;) {
+ current->state = TASK_INTERRUPTIBLE;
if (!dev->lock.hw_lock) {
/* Device has been unregistered */
ret = -EINTR;
@@ -794,7 +794,6 @@
/* Contention */
atomic_inc(&dev->total_sleeps);
- current->state = TASK_INTERRUPTIBLE;
schedule();
if (signal_pending(current)) {
ret = -ERESTARTSYS;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)