diff options
author | Hermet Park <hermetpark@gmail.com> | 2018-11-15 12:15:58 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2018-11-15 12:17:38 +0900 |
commit | 574e73598ef512b50d88ac0985ee3091264095b5 (patch) | |
tree | 9b1542b9aeca9c7dae2993b73b3c83b5502f7975 /src/lib/ector/software | |
parent | bd81e38434660314249036170f84e3fc7a6904ea (diff) |
ector: fix wrong initalization count reference.
Ector shutdown couldn't terminate engine properly
since it's counting statement is wrong.
Diffstat (limited to '')
-rw-r--r-- | src/lib/ector/software/ector_software_surface.c | 8 |
1 files 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 | |||
21 | void *data; | 21 | void *data; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | static int count_init = 0; | 24 | static int _count_init = 0; |
25 | static unsigned int current = 0; | 25 | static unsigned int current = 0; |
26 | static unsigned int cpu_core = 0; | 26 | static unsigned int cpu_core = 0; |
27 | static Ector_Software_Thread *ths = NULL; | 27 | static Ector_Software_Thread *ths = NULL; |
@@ -69,7 +69,8 @@ _ector_software_init(void) | |||
69 | { | 69 | { |
70 | int cpu, i; | 70 | int cpu, i; |
71 | 71 | ||
72 | if (count_init++) return ; | 72 | ++_count_init; |
73 | if (_count_init != 1) return; | ||
73 | 74 | ||
74 | cpu = eina_cpu_count() - 1; | 75 | cpu = eina_cpu_count() - 1; |
75 | if (cpu < 1) | 76 | if (cpu < 1) |
@@ -106,7 +107,8 @@ _ector_software_shutdown(void) | |||
106 | Ector_Software_Thread *t; | 107 | Ector_Software_Thread *t; |
107 | unsigned int i; | 108 | unsigned int i; |
108 | 109 | ||
109 | if (!--count_init) return ; | 110 | --_count_init; |
111 | if (_count_init != 0) return; | ||
110 | 112 | ||
111 | if (!ths) | 113 | if (!ths) |
112 | { | 114 | { |