diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-11-11 21:00:05 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-11-11 21:00:05 (GMT) |
commit | 0727204e36e919f06e80181482981c3f19669d76 (patch) | |
tree | ada49befbc7d91d21623f5221a2f7001d4b741a2 /src/analysis | |
parent | dc49b249f21c1c8582b9ca8debdd5fbdd15eadae (diff) |
Prepared the next generation of parallel processings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@606 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/disass/disassembler.c | 8 | ||||
-rw-r--r-- | src/analysis/project.c | 8 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c index 990ab0f..2f9d293 100644 --- a/src/analysis/disass/disassembler.c +++ b/src/analysis/disass/disassembler.c @@ -116,6 +116,11 @@ G_DEFINE_TYPE(GDelayedDisassembly, g_delayed_disassembly, G_TYPE_DELAYED_WORK); static void g_delayed_disassembly_class_init(GDelayedDisassemblyClass *klass) { + GDelayedWorkClass *work; /* Version en classe parente */ + + work = G_DELAYED_WORK_CLASS(klass); + + work->run = (run_task_fc)g_delayed_disassembly_process; } @@ -134,7 +139,6 @@ static void g_delayed_disassembly_class_init(GDelayedDisassemblyClass *klass) static void g_delayed_disassembly_init(GDelayedDisassembly *disass) { - G_DELAYED_WORK(disass)->run = (run_task_fc)g_delayed_disassembly_process; } @@ -711,6 +715,6 @@ void disassemble_binary(GLoadedBinary *binary, GArchInstruction **instrs, GCodeB g_signal_connect(disass, "work-completed", G_CALLBACK(ack), binary); queue = get_work_queue(); - g_work_queue_schedule_work(queue, G_DELAYED_WORK(disass)); + g_work_queue_schedule_work(queue, G_DELAYED_WORK(disass), DEFAULT_WORK_GROUP); } diff --git a/src/analysis/project.c b/src/analysis/project.c index 8fef602..ed60929 100644 --- a/src/analysis/project.c +++ b/src/analysis/project.c @@ -971,12 +971,16 @@ G_DEFINE_TYPE(GDelayedStudy, g_delayed_study, G_TYPE_DELAYED_WORK); static void g_delayed_study_class_init(GDelayedStudyClass *klass) { GObjectClass *object; /* Autre version de la classe */ + GDelayedWorkClass *work; /* Version en classe parente */ object = G_OBJECT_CLASS(klass); + work = G_DELAYED_WORK_CLASS(klass); object->dispose = (GObjectFinalizeFunc/* ! */)g_delayed_study_dispose; object->finalize = (GObjectFinalizeFunc)g_delayed_study_finalize; + work->run = (run_task_fc)g_delayed_study_process; + } @@ -994,8 +998,6 @@ static void g_delayed_study_class_init(GDelayedStudyClass *klass) static void g_delayed_study_init(GDelayedStudy *dstudy) { - G_DELAYED_WORK(dstudy)->run = (run_task_fc)g_delayed_study_process; - dstudy->only_preload = false; } @@ -1210,6 +1212,6 @@ void study_new_content(GDelayedStudy *dstudy) GWorkQueue *queue; /* Gestionnaire de différés */ queue = get_work_queue(); - g_work_queue_schedule_work(queue, G_DELAYED_WORK(dstudy)); + g_work_queue_schedule_work(queue, G_DELAYED_WORK(dstudy), DEFAULT_WORK_GROUP); } |