Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2013 19:26:55 +0300
From:      Andriy Gapon <>
To:        Joe Marcus Clarke <>, Daniel Eischen <>
Cc:        Koop Mast <>,
Subject:   Re: Mutexes and error checking
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <> <> <> <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
on 21/07/2013 19:02 Jilles Tjoelker said the following:
> So I think allowing pthread_mutex_unlock() by a different thread would
> be a step backwards.

There is something else that bothers me too.
Properly written code always "knows" whether it has a lock or not.  It does not
try to unlock on a whim.  Apparently the software in question is not properly
written.  Nevertheless, it takes care to check return status of
pthread_mutex_unlock().  And, to add insult to injury, it depends on OS-specific
behavior in doing so.  That seems like "two wrongs make a right" thing.

I understand that "life is such", etc, but it hurts to see us bend for such a
backwards code.

Andriy Gapon

Want to link to this message? Use this URL: <>