Mutexes and error checking

Martin Simmons martin at lispworks.com
Tue Jul 23 15:53:56 UTC 2013


>>>>> On Sun, 21 Jul 2013 16:52:08 -0400, Joe Marcus Clarke said:
> 
> The specifics are this.  There are some GNOME/GTK+/GLib apps that are
> crashing now that GLib checks the return of pthread_mutex_unlock() in
> g_mutex_unlock().  While we can workaround this in GLib by simply
> nop'ing the EPERM return, we'd like to pursue something that may be a
> bit more manageable for those apps written for Linux that do not use GLib.

Which apps are broken and why can't they be fixed?


> Again, I'm not arguing the voracity of the 3rd party app code, just the
> discrepancy between Linux and Solaris compared to FreeBSD.

Note that unlocking an unlocked normal mutex on Linux (glibc) does *not* work,
but leaves it in a subtly inconsistent state.  Therefore bugs like the one you
reported to the GNOME Bugzilla
(https://bugzilla.gnome.org/show_bug.cgi?id=678758) should be fixed, not
ignored by hiding the error status.

__Martin


More information about the freebsd-threads mailing list