summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-09-19 19:24:28 +0000
committerRik Faith <faith@alephnull.com>2000-09-19 19:24:28 +0000
commit01346c98b1d919374dc1f2ee70d4b401d2eaad67 (patch)
tree4587e5f414f58a24e24145b427ff1fe5e82010d0 /linux
parente2a16e1906592636e5e0e5ed82db776466b7e494 (diff)
Make management of current->state correct (accidentally made incorrect when
fixing the trispd bug).
Diffstat (limited to 'linux')
-rw-r--r--linux/mga_dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/mga_dma.c b/linux/mga_dma.c
index ae1d3e12..64de17c7 100644
--- a/linux/mga_dma.c
+++ b/linux/mga_dma.c
@@ -224,13 +224,13 @@ drm_buf_t *mga_freelist_get(drm_device_t *dev)
dev_priv->last_prim_age);
set_bit(MGA_IN_GETBUF, &dev_priv->dispatch_status);
add_wait_queue(&dev_priv->buf_queue, &entry);
+ current->state = TASK_INTERRUPTIBLE;
for (;;) {
mga_dma_schedule(dev, 0);
if(!test_bit(MGA_IN_GETBUF,
&dev_priv->dispatch_status))
break;
atomic_inc(&dev->total_sleeps);
- current->state = TASK_INTERRUPTIBLE;
schedule();
if (signal_pending(current)) {
++return_null;
@@ -239,6 +239,7 @@ drm_buf_t *mga_freelist_get(drm_device_t *dev)
break;
}
}
+ current->state = TASK_RUNNING;
remove_wait_queue(&dev_priv->buf_queue, &entry);
if (return_null) return NULL;
}