gegl r2142 - trunk/gegl/buffer
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2142 - trunk/gegl/buffer
- Date: Sat, 1 Mar 2008 21:28:24 +0000 (GMT)
Author: ok
Date: Sat Mar 1 21:28:24 2008
New Revision: 2142
URL: http://svn.gnome.org/viewvc/gegl?rev=2142&view=rev
Log:
* gegl/buffer/gegl-tile.[ch]: (dispose), (gegl_tile_new),
(gegl_tile_lock), (gegl_tile_unlock): Added a mutex being used when
writing to tiles.
Modified:
trunk/gegl/buffer/gegl-tile.c
Modified: trunk/gegl/buffer/gegl-tile.c
==============================================================================
--- trunk/gegl/buffer/gegl-tile.c (original)
+++ trunk/gegl/buffer/gegl-tile.c Sat Mar 1 21:28:24 2008
@@ -128,11 +128,11 @@
}
#if ENABLE_MP
- if (self->mutex)
- {
- g_mutex_free (self->mutex);
- self->mutex = NULL;
- }
+ if (tile->mutex)
+ {
+ g_mutex_free (tile->mutex);
+ tile->mutex = NULL;
+ }
#endif
(*G_OBJECT_CLASS (parent_class)->dispose)(object);
@@ -181,6 +181,10 @@
tile->next_shared = tile;
tile->prev_shared = tile;
+
+#if ENABLE_MP
+ tile->mutex = g_mutex_new ();
+#endif
}
GeglTile *
@@ -211,9 +215,6 @@
tile->size = size;
tile->stored_rev = 1;
-#if ENABLE_MP
- tile->mutex = g_mutex_new ();
-#endif
return tile;
}
@@ -246,7 +247,7 @@
}
total_locks++;
-#if ENABLE_MT
+#if ENABLE_MP
g_mutex_lock (tile->mutex);
#endif
@@ -336,7 +337,7 @@
gegl_tile_void_pyramid (tile);
tile->rev++;
}
-#if ENABLE_MT
+#if ENABLE_MP
g_mutex_unlock (tile->mutex);
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]