[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: [PATCH] Robust and Real-time Mutexes in NPTL



> From: Carlo Wood [mailto:carlo alinoe com]
> 
> That sounds like you describe the detection of a *normal*
> deadlock that is about to happen.
> 
> My proposal is to detect a *possible* dead-lock that
> is not actually dead-locking at that moment.  For example:
> 
> Thread1:
> 
>   lock A
>   lock B
>   unlock B
>   unlock A
> 
> And AFTER all of the above has happened, the application
> continues (5 minutes later, say) with:
> 
> Thread2:
> 
>   lock B
>   lock A  <-- core dump (possible dead-lock).
> 

Ahhh, got it, I guess I missed that part.

Well, still, this falls into the realm of "don't do that". 
Doing that is a bug in your program if it does not allow 
it, and this kind of defensive programming would take 
too many resources to implement.

Although if you find a non-invasive way to do it, hey,
go for it!

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own (and my fault)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]