summaryrefslogtreecommitdiff
path: root/src/gtkext/graph/nodes
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-04-20 12:07:19 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-04-20 12:07:19 (GMT)
commit59f319d9a6961a7424c7b32f49aa7ac1045a1d4c (patch)
treee9d62c684dd8d8f5e141b9332994041bd2371f9a /src/gtkext/graph/nodes
parent8962a4e61411c8362d5f4be63496977164b886a8 (diff)
Protected all concurrent accesses to sources and destinations of instructions.
Diffstat (limited to 'src/gtkext/graph/nodes')
-rw-r--r--src/gtkext/graph/nodes/flow.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gtkext/graph/nodes/flow.c b/src/gtkext/graph/nodes/flow.c
index 343f916..e19cacb 100644
--- a/src/gtkext/graph/nodes/flow.c
+++ b/src/gtkext/graph/nodes/flow.c
@@ -827,6 +827,8 @@ static void g_flow_node_setup_entry_slots(GFlowNode *node)
size_t used; /* Nombre de liens utilisés */
g_flow_block_get_boundary(node->block, &first, NULL);
+
+ g_arch_instruction_rlock_src(first);
icount = g_arch_instruction_get_sources(first, &instrs, &types);
usable = 0;
@@ -892,6 +894,8 @@ static void g_flow_node_setup_entry_slots(GFlowNode *node)
assert(used == usable);
+ g_arch_instruction_runlock_src(first);
+
}
@@ -918,6 +922,8 @@ static void g_flow_node_setup_exit_slots(GFlowNode *node)
size_t used; /* Nombre de liens utilisés */
g_flow_block_get_boundary(node->block, NULL, &last);
+
+ g_arch_instruction_rlock_dest(last);
icount = g_arch_instruction_get_destinations(last, &instrs, &types, NULL);
usable = 0;
@@ -983,6 +989,8 @@ static void g_flow_node_setup_exit_slots(GFlowNode *node)
assert(used == usable);
+ g_arch_instruction_runlock_dest(last);
+
}