Re: [patch] Real-Time Preemption, -RT-2.6.12-rc1-V0.7.41-07

Steven Rostedt
2005-03-31T12:59:54Z

On Thu, 2005-03-31 at 07:36 -0500, Steven Rostedt wrote:
> On Thu, 2005-03-31 at 13:03 +0200, Ingo Molnar wrote:
> > * Steven Rostedt <rostedt@goodmis.org> wrote:
>

> Since this happened with the trylock, do you see anyway that a pending
> owner can cause problems? Maybe this has to do with is_locked. Now a
> pending owner makes this ambiguous. Since the lock has a owner, and a
> task can't get it if it is of lower priority than the pending owner, but
> it can get it if it is higher. Now is it locked? My implementation was
> to be safe and say that it is locked.
>
> I'll play around some more with this.

Oops! Found a little bug. Ingo, see if this fixes it.

-- Steve

--- ./kernel/rt.c.orig 2005-03-31 07:27:59.000000000 -0500
+++ ./kernel/rt.c 2005-03-31 07:53:14.913072893 -0500
@@ -1244,7 +1244,7 @@
/*
* Check to see if we didn't have ownership stolen.
*/
- if (ret) {
+ if (!ret) {
if (capture_lock(&waiter,task)) {
set_task_state(task, TASK_INTERRUPTIBLE);
goto wait_again;