Subject: Re: Unlocking an unlocked mutex
To: None <tech-kern@netbsd.org>
From: Matthew Mondor <mm_lists@pulsar-zone.net>
List: tech-kern
Date: 10/13/2005 19:15:52
On Thu, 13 Oct 2005 09:31:30 -0700
Bill Studenmund <wrstuden@netbsd.org> wrote:

> My day job is writing an application that uses pthreads. These assertions 
> REALLY help. The problem with unlocking an unlocked mutex is that you most 
> likely just finished modifying data that another thread thought _it_ had 
> exclusive access to. You can end up with problems showing up in whatever 
> code goes to use the unprotected data, so the end error looks like it's 
> miles away from where the bug is.

I strongly concur, I could fix one of my own bugs in a library I used for
several years on Linux without ever knowing it was there, until I decided
to switch the server to NetBSD.  Moreover, I also cought a similar issue
in some of my software when converting it from PTH threads to pthreads on
NetBSD...  So I very like much the current default behavior.

Matt

-- 
Note: Please only reply on the list, other mail is blocked by default.
Private messages from your address can be allowed by first asking.