[gegl] tile-handler-empty: add a memory barrier before cloning the common tile
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] tile-handler-empty: add a memory barrier before cloning the common tile
- Date: Fri, 21 Jul 2017 08:52:19 +0000 (UTC)
commit d5a00968c98f86b360ceed5c71e082c5ddc17983
Author: Ell <ell_se yahoo com>
Date: Fri Jul 21 03:59:04 2017 -0400
tile-handler-empty: add a memory barrier before cloning the common tile
... to be on the safe side.
gegl/buffer/gegl-tile-handler-empty.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-handler-empty.c b/gegl/buffer/gegl-tile-handler-empty.c
index d6dffbd..8bec7f6 100644
--- a/gegl/buffer/gegl-tile-handler-empty.c
+++ b/gegl/buffer/gegl-tile-handler-empty.c
@@ -60,7 +60,8 @@ _new_empty_tile (const gint tile_size)
}
else
{
- if (!common_tile && g_once_init_enter (&common_tile))
+ if (!g_atomic_pointer_get (&common_tile) &&
+ g_once_init_enter (&common_tile))
{
GeglTile *allocated_tile = gegl_tile_new_bare ();
guchar *allocated_buffer = gegl_malloc (common_empty_size);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]