summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-09-16 21:59:47 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-09-16 21:59:47 (GMT)
commit264883a204ff89fcf53bb9c07bac1248096af0ef (patch)
tree73d3a7f3e33ed2ae1fbd622ec437bf3b1c5a7673 /src
parent2e87fbdf79b41314ef84b695705e20d5c38ffe31 (diff)
Relied on the remaining contents to explore to run the resolving process.
Diffstat (limited to 'src')
-rw-r--r--src/analysis/loading.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/analysis/loading.c b/src/analysis/loading.c
index b8fbeea..7e2f9ee 100644
--- a/src/analysis/loading.c
+++ b/src/analysis/loading.c
@@ -106,6 +106,8 @@ typedef struct _exploring_group
{
GBinContent *original; /* Contenu binaire initial */
+ size_t remaining; /* Nombre de tâches restantes */
+
wgroup_id_t wid; /* Groupe d'appartenance */
GBinContent **contents; /* Contenus reconnus dispos. */
@@ -657,7 +659,6 @@ static void g_content_explorer_ack(GContentExplorer *explorer, GExploringWork *w
{
wgroup_id_t wid; /* Groupe d'appartenance */
exploring_group *group; /* Groupe d'opération concerné */
- GWorkQueue *queue; /* Gestionnaire de différés */
bool empty; /* Fin de l'exploration ? */
wid = g_exploring_work_get_group_id(work);
@@ -667,9 +668,9 @@ static void g_content_explorer_ack(GContentExplorer *explorer, GExploringWork *w
group = g_content_explorer_find_group(explorer, wid);
assert(group != NULL);
- queue = get_work_queue();
+ assert(group->remaining > 0);
- empty = g_work_queue_is_empty(queue, group->wid);
+ empty = (--group->remaining == 0);
g_mutex_unlock(&explorer->mutex);
@@ -721,6 +722,8 @@ wgroup_id_t g_content_explorer_create_group(GContentExplorer *explorer, GBinCont
group->original = content;
g_object_ref(G_OBJECT(content));
+ group->remaining = 1;
+
group->wid = result;
group->contents = NULL;
@@ -827,6 +830,8 @@ void g_content_explorer_populate_group(GContentExplorer *explorer, wgroup_id_t w
/* Relancement des explorations */
+ group->remaining++;
+
work = g_exploring_work_new(content);
g_exploring_work_set_group_id(work, group->wid);