summaryrefslogtreecommitdiff
path: root/linux-core/tdfx_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/tdfx_drv.c')
-rw-r--r--linux-core/tdfx_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/tdfx_drv.c b/linux-core/tdfx_drv.c
index 689b360a..d8f5bcc8 100644
--- a/linux-core/tdfx_drv.c
+++ b/linux-core/tdfx_drv.c
@@ -562,6 +562,7 @@ int tdfx_lock(struct inode *inode, struct file *filp, unsigned int cmd,
#endif
add_wait_queue(&dev->lock.lock_queue, &entry);
for (;;) {
+ current->state = TASK_INTERRUPTIBLE;
if (!dev->lock.hw_lock) {
/* Device has been unregistered */
ret = -EINTR;
@@ -577,7 +578,6 @@ int tdfx_lock(struct inode *inode, struct file *filp, unsigned int cmd,
/* Contention */
atomic_inc(&dev->total_sleeps);
- current->state = TASK_INTERRUPTIBLE;
#if 1
current->policy |= SCHED_YIELD;
#endif