示例#1
0
void gd_timer_processor_free_basic(gd_timer_mgr_t mgr, struct gd_timer_processor * data) {
    if (data->m_tl_event) {
        tl_event_free(data->m_tl_event);
        data->m_tl_event = NULL;
    }
    else {
        if (data->m_state == timer_processor_state_InResponserHash) {
            cpe_hash_table_remove_by_ins(&mgr->m_responser_to_processor, data);
            data->m_state = timer_processor_state_NotInResponserHash;
        }

        if (data->m_process_arg_free) data->m_process_arg_free(data->m_process_arg);

        data->m_process_ctx = NULL;
        data->m_process_arg = NULL;
        data->m_process_arg_free = NULL;
        data->m_process_fun = NULL;
    }
}
示例#2
0
void dr_metalib_source_free(dr_metalib_source_t source) {
    assert(source);

    while(!TAILQ_EMPTY(&source->m_elements)) {
        dr_metalib_source_element_free(TAILQ_FIRST(&source->m_elements));
    }

    while(!TAILQ_EMPTY(&source->m_includes)) {
        dr_metalib_source_relation_free(TAILQ_FIRST(&source->m_includes));
    }

    while(!TAILQ_EMPTY(&source->m_include_by)) {
        dr_metalib_source_relation_free(TAILQ_FIRST(&source->m_include_by));
    }

    TAILQ_REMOVE(&source->m_builder->m_sources_in_order, source, m_next);
    cpe_hash_table_remove_by_ins(&source->m_builder->m_sources, source);

    mem_free(source->m_builder->m_alloc, (void *)source->m_name);
}
示例#3
0
void dp_rsp_free(dp_rsp_t rsp) {
    if (rsp == NULL) return;
    cpe_hash_table_remove_by_ins(&rsp->m_dp->m_rsps, rsp);
}