Re: [patch] schedule may be a nono in locks.c

Andrea Arcangeli (andrea@e-mind.com)
Tue, 11 May 1999 03:19:25 +0200 (CEST)


On Tue, 11 May 1999, Andrea Arcangeli wrote:

>@@ -267,6 +267,7 @@
> /* Let the blocked process remove waiter from the
> * block list when it gets scheduled.
> */
>+ current->policy |= SCHED_YIELD;
> schedule();
> else
> /* Remove waiter from the block list, because by the

Here it is a patch that also compiles ;)

Index: locks.c
===================================================================
RCS file: /var/cvs/linux/fs/locks.c,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 locks.c
--- locks.c 1999/04/09 16:53:45 1.1.2.3
+++ linux/fs/locks.c 1999/05/11 01:14:48
@@ -264,10 +264,13 @@
waiter->fl_notify(waiter);
wake_up(&waiter->fl_wait);
if (wait)
+ {
/* Let the blocked process remove waiter from the
* block list when it gets scheduled.
*/
+ current->policy |= SCHED_YIELD;
schedule();
+ }
else
/* Remove waiter from the block list, because by the
* time it wakes up blocker won't exist any more.

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/