lkml.org 
[lkml]   [2015]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH RT 0/3] RT: Fix trylock deadlock without msleep() hack
On Sat, 5 Sep 2015 14:04:57 +0200
Ingo Molnar <mingo@kernel.org> wrote:


> So why not do:
>
> lock(B);
> if (!trylock(A)) {
> unlock(B);
> lock(A);
> lock(B);
> }
>
> ?
>
> Or, if this can be done, why didn't we do:
>
> lock(A);
> lock(B);
>
> to begin with?
>
> i.e. I'm not sure the problem is properly specified.

Yeah, this is actually the solution I came up with before. I misread
what Thomas wrote. His is slightly different.

-- Steve


\
 
 \ /
  Last update: 2015-09-05 14:41    [W:0.115 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site