Untested patch:
--- semaphore.c.orig Wed Apr 4 12:54:30 2001
+++ semaphore.c Wed Apr 4 12:54:58 2001
@@ -363,26 +363,26 @@
*/
struct rw_semaphore *down_write_failed(struct rw_semaphore *sem)
{
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
__up_write(sem); /* this takes care of granting the lock
*/
- add_wait_queue_exclusive(&sem->wait, &wait);
+ add_wait_queue_exclusive(&sem->write_bias_wait, &wait);
while (atomic_read(&sem->count) < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
if (atomic_read(&sem->count) >= 0)
break; /* we must attempt to acquire or bias
the lock */
schedule();
}
- remove_wait_queue(&sem->wait, &wait);
+ remove_wait_queue(&sem->write_bias_wait, &wait);
tsk->state = TASK_RUNNING;
return sem;
}
asm(
"
.align 4
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/