G_LOCK: port from GStaticMutex to GMutex

GCancellable made use of the undocumented G_LOCK_NAME macro in an
invalid way.  Fix that up while we're at it.
This commit is contained in:
Ryan Lortie
2011-09-17 18:33:25 -04:00
parent 2c7388c19a
commit cf26a6fc32
2 changed files with 10 additions and 12 deletions

View File

@@ -270,8 +270,7 @@ g_cancellable_reset (GCancellable *cancellable)
while (priv->cancelled_running)
{
priv->cancelled_running_waiting = TRUE;
g_cond_wait (cancellable_cond,
g_static_mutex_get_mutex (& G_LOCK_NAME (cancellable)));
g_cond_wait (cancellable_cond, &G_LOCK_NAME (cancellable));
}
if (priv->cancelled)
@@ -619,8 +618,7 @@ g_cancellable_disconnect (GCancellable *cancellable,
while (priv->cancelled_running)
{
priv->cancelled_running_waiting = TRUE;
g_cond_wait (cancellable_cond,
g_static_mutex_get_mutex (& G_LOCK_NAME (cancellable)));
g_cond_wait (cancellable_cond, &G_LOCK_NAME (cancellable));
}
g_signal_handler_disconnect (cancellable, handler_id);