From 574e73598ef512b50d88ac0985ee3091264095b5 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 15 Nov 2018 12:15:58 +0900 Subject: [PATCH] ector: fix wrong initalization count reference. Ector shutdown couldn't terminate engine properly since it's counting statement is wrong. --- src/lib/ector/software/ector_software_surface.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/ector/software/ector_software_surface.c b/src/lib/ector/software/ector_software_surface.c index 2907272f40..10cf9962fd 100644 --- a/src/lib/ector/software/ector_software_surface.c +++ b/src/lib/ector/software/ector_software_surface.c @@ -21,7 +21,7 @@ struct _Ector_Software_Task void *data; }; -static int count_init = 0; +static int _count_init = 0; static unsigned int current = 0; static unsigned int cpu_core = 0; static Ector_Software_Thread *ths = NULL; @@ -69,7 +69,8 @@ _ector_software_init(void) { int cpu, i; - if (count_init++) return ; + ++_count_init; + if (_count_init != 1) return; cpu = eina_cpu_count() - 1; if (cpu < 1) @@ -106,7 +107,8 @@ _ector_software_shutdown(void) Ector_Software_Thread *t; unsigned int i; - if (!--count_init) return ; + --_count_init; + if (_count_init != 0) return; if (!ths) {