GMutex (linux): detect and report some errors
authorRyan Lortie <desrt@desrt.ca>
Sun, 29 Jun 2014 21:47:10 +0000 (17:47 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 9 Jul 2014 14:59:06 +0000 (10:59 -0400)
commitecf1359191b2f796a7d63288652dd1a93525417d
treebba1a01af536dce9313b38230c047495be152098
parent49b59e5ac4428a6a99a85d699c3662f96efc4e9d
GMutex (linux): detect and report some errors

Detect the following two errors:

 - attempting to unlock a mutex that is not locked

 - attempting to clear a mutex that was not initialised or was
   initialised but is still locked

Both of these are fatal errors.  We avoid using g_error() here because
doing so would involve calls back into the GMutex code, and if things
are going off the rails then we want to avoid that.

https://bugzilla.gnome.org/show_bug.cgi?id=731986
glib/gthread-posix.c