sc_result utils_collect_identifiers_shutdown() { if (event_add_idtf) { sc_event_destroy(event_add_idtf); event_add_idtf = 0; } if (event_add_main_idtf) { sc_event_destroy(event_add_main_idtf); event_add_main_idtf = 0; } if (event_add_sys_idtf) { sc_event_destroy(event_add_sys_idtf); event_add_sys_idtf = 0; } g_mutex_lock(&ci_redis_mutex); ping_thread_running = FALSE; g_mutex_unlock(&ci_redis_mutex); if (ping_thread) { g_thread_join(ping_thread); ping_thread = 0; } if (redisCtx) redisFree(redisCtx); return SC_RESULT_OK; }
void test7() { sc_uint32 i, j; sc_addr addr, addr1, addr2; sc_addr new_addr; sc_event *event1, *event2, *event3, *event4; printf("Segments count: %d\n", sc_storage_get_segments_count()); print_storage_statistics(); timer = g_timer_new(); g_timer_reset(timer); g_timer_start(timer); addr = sc_storage_node_new(0); addr1 = sc_storage_node_new(0); printf("Register events\n"); event1 = sc_event_new(addr, SC_EVENT_ADD_OUTPUT_ARC, 0, &event_callback, 0); event2 = sc_event_new(addr1, SC_EVENT_ADD_INPUT_ARC, 1, &event_callback, 0); event3 = sc_event_new(addr, SC_EVENT_REMOVE_OUTPUT_ARC, 2, &event_callback, 0); event4 = sc_event_new(addr1, SC_EVENT_REMOVE_INPUT_ARC, 3, &event_callback, 0); addr2 = sc_storage_arc_new(0, addr, addr1); sc_storage_element_free(addr2); printf("Unregister events\n"); sc_event_destroy(event1); sc_event_destroy(event2); sc_event_destroy(event3); sc_event_destroy(event4); addr2 = sc_storage_arc_new(0, addr, addr1); sc_storage_element_free(addr2); g_timer_stop(timer); printf("Segments count: %d\n", sc_storage_get_segments_count()); print_storage_statistics(); g_timer_destroy(timer); }
void sctpEventManager::shutdown() { QMutexLocker locker(&mEventsMutex); tScEventsMap::iterator it, itEnd = mEvents.end(); for (it = mEvents.begin(); it != itEnd; ++it) { sEventData *evt = it->second; sc_event_destroy(evt->event); delete evt; } mEvents.clear(); }
_SC_EXT_EXTERN sc_result sc_module_shutdown() { sc_result res = SC_RESULT_OK; if (utils_collect_identifiers_shutdown() != SC_RESULT_OK) res = SC_RESULT_ERROR; if (event_garbage_deletion) sc_event_destroy(event_garbage_deletion); sc_memory_context_free(s_garbage_ctx); sc_memory_context_free(s_default_ctx); return res; }
bool sctpEventManager::destroyEvent(tEventId event) { QMutexLocker locker(&mEventsMutex); tScEventsMap::iterator it = mEvents.find(event); if (it == mEvents.end()) return false; Q_ASSERT(it->second->id == event); if (sc_event_destroy(it->second->event) != SC_RESULT_OK) return false; mEvents.erase(it); return true; }
scp_result scp_procedure_preprocessor_shutdown() { sc_event_destroy(event_procedure_preprocessing); return SCP_RESULT_TRUE; }
scp_result scp_process_destroyer_shutdown() { sc_event_destroy(event_process_destroy); return SCP_RESULT_TRUE; }
sc_result shutdown() { sc_event_destroy(event_question_search_all_output_arcs); return SC_RESULT_OK; }
_SC_EXT_EXTERN sc_result sc_module_shutdown() { if (event_question_search_all_output_arcs) sc_event_destroy(event_question_search_all_output_arcs); if (event_question_search_all_input_arcs) sc_event_destroy(event_question_search_all_input_arcs); if (event_question_search_all_output_arcs_with_rel) sc_event_destroy(event_question_search_all_output_arcs_with_rel); if (event_question_search_all_input_arcs_with_rel) sc_event_destroy(event_question_search_all_input_arcs_with_rel); if (event_question_search_full_semantic_neighborhood) sc_event_destroy(event_question_search_full_semantic_neighborhood); if (event_question_search_all_identified_elements) sc_event_destroy(event_question_search_all_identified_elements); if (event_question_search_all_identifiers) sc_event_destroy(event_question_search_all_identifiers); if (event_question_search_decomposition) sc_event_destroy(event_question_search_decomposition); if (event_question_search_all_subclasses_in_quasybinary_relation) sc_event_destroy(event_question_search_all_subclasses_in_quasybinary_relation); if (event_question_search_all_superclasses_in_quasybinary_relation) sc_event_destroy(event_question_search_all_superclasses_in_quasybinary_relation); if (event_question_search_links_of_relation_connected_with_element) sc_event_destroy(event_question_search_links_of_relation_connected_with_element); sc_memory_context_free(s_default_ctx); return SC_RESULT_OK; }