[babl] Remove workaround for non-recursive mutexes.
- From: Nils Philippsen <nphilipp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] Remove workaround for non-recursive mutexes.
- Date: Fri, 13 Feb 2015 16:21:47 +0000 (UTC)
commit 81ef6f201164c81876028a506b00b52976041741
Author: Nils Philippsen <nils redhat com>
Date: Fri Feb 13 13:29:13 2015 +0100
Remove workaround for non-recursive mutexes.
This workaround caused concurrency-stress-test to fail occasionally.
Meanwhile BablMutex wraps pthread mutexes in a way that they are
initialized as recursive.
This partially reverts commit 9d2aa7d13ac421935de1e87301c48af50b0ceb59.
babl/babl-fish-path.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c
index 5dc0601..bf9c520 100644
--- a/babl/babl-fish-path.c
+++ b/babl/babl-fish-path.c
@@ -300,8 +300,7 @@ babl_fish_path (const Babl *source,
pc.fish_path = babl;
pc.to_format = (Babl *) destination;
- if (babl_in_fish_path <= 0)
- babl_mutex_lock (babl_format_mutex);
+ babl_mutex_lock (babl_format_mutex);
/* we hold a global lock whilerunning get_conversion_path since
* it depends on keeping the various format.visited members in
* a consistent state, this code path is not performance critical
@@ -312,8 +311,7 @@ babl_fish_path (const Babl *source,
get_conversion_path (&pc, (Babl *) source, 0, max_path_length ());
babl_in_fish_path--;
- if (babl_in_fish_path <= 0)
- babl_mutex_unlock (babl_format_mutex);
+ babl_mutex_unlock (babl_format_mutex);
babl_free (pc.current_path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]