summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-12-16 21:55:04 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-12-16 21:55:04 (GMT)
commit64e09a6c3e39785975b5322973ed83734cedb82e (patch)
treea87d29cca9d86ccd26676460282ddf59c4e9cb17 /src/plugins
parent2581d80875304c466e8930dbe67986ceb95752b2 (diff)
Reintroduced the delayed disassembling of binaries.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@304 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/pglist.c12
-rw-r--r--src/plugins/pglist.h2
2 files changed, 12 insertions, 2 deletions
diff --git a/src/plugins/pglist.c b/src/plugins/pglist.c
index 14e6b48..bca3e6a 100644
--- a/src/plugins/pglist.c
+++ b/src/plugins/pglist.c
@@ -263,6 +263,7 @@ void add_plugin_to_main_list(GPluginModule *plugin)
* *
* Paramètres : binary = binaire chargé en mémoire à traiter. *
* action = fonctionnalité recherchée. *
+* lock = indique si l'exécution n'est pas celle principale. *
* *
* Description : Opère une action donnée sur un binaire défini. *
* *
@@ -272,12 +273,21 @@ void add_plugin_to_main_list(GPluginModule *plugin)
* *
******************************************************************************/
-void run_plugins_on_binary(GLoadedBinary *binary, PluginAction action)
+void run_plugins_on_binary(GLoadedBinary *binary, PluginAction action, bool lock)
{
size_t i; /* Boucle de parcours */
+ if (lock)
+ gdk_threads_enter();
+
for (i = 0; i < _list.plugins_count; i++)
if (g_plugin_module_get_action(_list.plugins[i]) & action)
g_plugin_module_execute_action_on_binary(_list.plugins[i], binary, action);
+ if (lock)
+ {
+ gdk_flush();
+ gdk_threads_leave();
+ }
+
}
diff --git a/src/plugins/pglist.h b/src/plugins/pglist.h
index 2804108..e77bc8b 100644
--- a/src/plugins/pglist.h
+++ b/src/plugins/pglist.h
@@ -45,7 +45,7 @@ GPluginModule *get_one_plugin_for_action(PluginAction);
GPluginModule **get_all_plugins_for_action(PluginAction, size_t *) __attribute__ ((deprecated));
/*Opère une action donnée sur un binaire défini. */
-void run_plugins_on_binary(GLoadedBinary *, PluginAction);
+void run_plugins_on_binary(GLoadedBinary *, PluginAction, bool);