raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=22869bb94ee6ae30432596d7472220f300d5f438

commit 22869bb94ee6ae30432596d7472220f300d5f438
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sat Dec 12 23:37:16 2015 +0900

    evas - fix evas module locks to init/del when movile created/destroyed
    
    we initted when we load and unload. this led to races with
    locking/unlocking elsewhere as these expected us to be initted and we
    were not yet. this fixes that!
    
    @fix
---
 src/lib/evas/file/evas_module.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c
index bafc6e7..cda2daf 100644
--- a/src/lib/evas/file/evas_module.c
+++ b/src/lib/evas/file/evas_module.c
@@ -304,6 +304,7 @@ evas_module_register(const Evas_Module_Api *module, 
Evas_Module_Type type)
    em = calloc(1, sizeof (Evas_Module));
    if (!em) return EINA_FALSE;
 
+   LKI(em->lock);
    em->definition = module;
 
    if (type == EVAS_MODULE_TYPE_ENGINE)
@@ -405,6 +406,7 @@ evas_module_unregister(const Evas_Module_Api *module, 
Evas_Module_Type type)
      eina_array_data_set(evas_engines, em->id_engine - 1, NULL);
 
    eina_hash_del(evas_modules[type], module->name, em);
+   LKD(em->lock);
    free(em);
 
    return EINA_TRUE;
@@ -512,7 +514,6 @@ evas_module_load(Evas_Module *em)
    if (!em->definition->func.open(em)) return 0;
    em->loaded = 1;
 
-   LKI(em->lock);
    return 1;
 }
 
@@ -528,7 +529,6 @@ evas_module_unload(Evas_Module *em)
 //   em->definition->func.close(em);
 //   em->loaded = 0;
 
-   LKD(em->lock);
 }
 
 void

-- 


Reply via email to