Eina_Bool eina_evlog_init(void) { eina_spinlock_new(&_evlog_lock); buf = &(buffers[0]); eina_evlog("+eina_init", NULL, 0.0, NULL); return EINA_TRUE; }
EAPI int eio_init(void) { if (++_eio_init_count != 1) return _eio_init_count; if (!eina_init()) { fprintf(stderr, "Eio can not initialize Eina\n"); return --_eio_init_count; } _eio_log_dom_global = eina_log_domain_register("eio", EIO_DEFAULT_LOG_COLOR); if (_eio_log_dom_global < 0) { EINA_LOG_ERR("Eio can not create a general log domain."); goto shutdown_eina; } if (!ecore_init()) { ERR("Can not initialize Ecore\n"); goto unregister_log_domain; } memset(&progress_pool, 0, sizeof(progress_pool)); memset(&direct_info_pool, 0, sizeof(direct_info_pool)); memset(&char_pool, 0, sizeof(char_pool)); memset(&associate_pool, 0, sizeof(associate_pool)); eina_lock_new(&(progress_pool.lock)); progress_pool.mem_size = sizeof (Eio_Progress); eina_lock_new(&(direct_info_pool.lock)); direct_info_pool.mem_size = sizeof (Eio_File_Direct_Info); eina_lock_new(&(char_pool.lock)); char_pool.mem_size = sizeof (Eio_File_Char); eina_lock_new(&(associate_pool.lock)); associate_pool.mem_size = sizeof (Eio_File_Associate); eina_spinlock_new(&(memory_pool_lock)); eina_lock_new(&(memory_pool_mutex)); eina_condition_new(&(memory_pool_cond), &(memory_pool_mutex)); eio_monitor_init(); eina_log_timing(_eio_log_dom_global, EINA_LOG_STATE_STOP, EINA_LOG_STATE_INIT); return _eio_init_count; unregister_log_domain: eina_log_domain_unregister(_eio_log_dom_global); _eio_log_dom_global = -1; shutdown_eina: eina_shutdown(); return --_eio_init_count; }
static Eina_Bool _config_init(Email_Config *cfg) { Eina_Bool chk; chk = eina_spinlock_new(&cfg->lock); if (EINA_UNLIKELY(!chk)) { CRI("Failed to create spinlock"); goto fail; } cfg->user_config = eina_hash_string_superfast_new(_free_cb); return EINA_TRUE; fail: return EINA_FALSE; }
static void _eina_stringshare_small_init(void) { eina_spinlock_new(&_mutex_small); memset(&_eina_small_share, 0, sizeof(_eina_small_share)); }