Subject: Re: Unlocking an unlocked mutex
To: Vincent <10.50@free.fr>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 10/12/2005 20:13:34
On Oct 12, 2005, at 1:12 PM, Vincent wrote:

> wxvlc: Error detected by libpthread: Unlocking unlocked mutex.
> Detected by file "pthread_mutex.c", line 345, function  
> "pthread_mutex_unlock". See pthread(3) for information.
>
> I was wondering if unlocking an (already) unlocked mutex *really*  
> deserves an error, or if it could just be turned into a non-fatal  
> warning or whatever. Obviously, this is not as critical as trying  
> to unlock another thread's mutex.

Yes, it's really an error.  IMO, the thread library should abort on  
such errors.  It indicates that the app modified a data structure it  
thought was locked, but in fact was not.

>
> Vincent

-- thorpej