Example #1
0
/* Free DSP Upper Instance */
static void esif_dsp_destroy(EsifDspPtr dspPtr)
{
	if (NULL == dspPtr) {
		return;
	}
	esif_ht_destroy(dspPtr->ht_ptr, NULL);
	esif_link_list_destroy(dspPtr->algo_ptr);
	esif_link_list_destroy(dspPtr->domain_ptr);
	esif_link_list_destroy(dspPtr->cap_ptr);
	esif_link_list_destroy(dspPtr->evt_ptr);
	esif_ccb_free(dspPtr);
}
Example #2
0
/* Destroy Hash Table */
void esif_ht_destroy(
    struct esif_ht *self,
    item_destroy_func item_destroy_fptr
)
{
    u32 index = 0;

    if ((self == NULL) || (self->table == NULL)) {
        ESIF_TRACE_ERROR("Hash table ptr NULL\n");
        goto exit;
    }

    ESIF_TRACE_DYN_VERB("Destroying hash table %p\n", self);

    for (index = 0; index < self->size; ++index) {
        if (self->table[index] == NULL)
            continue;

        ESIF_TRACE_DYN_VERB("Destroy linked list %d\n", index);

        esif_destroy_ht_nodes(self->table[index], item_destroy_fptr);
        esif_link_list_destroy(self->table[index]);
        self->table[index] = NULL;
    }

    esif_ccb_free(self->table);
    esif_ccb_mempool_free(ESIF_MEMPOOL_TYPE_HASH2, self);
exit:
    return;
}
Example #3
0
void EsifActMgrExit()
{
	u8 i = 0;
	EsifActPtr a_act_ptr = NULL;

	ESIF_TRACE_ENTRY_INFO();

	/* Call before destroying action manager */
	EsifActExit();

	if (NULL != g_actMgr.fActTypes) {
		esif_link_list_destroy(g_actMgr.fActTypes);
		g_actMgr.fActTypes = NULL;  //set to null so that it will be caught if mid-execution
	}

	esif_ccb_read_lock(&g_actMgr.fLock);
	for (i = 0; i < ESIF_MAX_ACTIONS; i++) {
		a_act_ptr = &g_actMgr.fEnrtries[i];
		esif_ccb_free(a_act_ptr->fLibNamePtr);
		esif_ccb_library_unload(a_act_ptr->fLibHandle);
		esif_ccb_memset(a_act_ptr, 0, sizeof(*a_act_ptr));
	}
	esif_ccb_read_unlock(&g_actMgr.fLock);

	esif_ccb_lock_uninit(&g_actMgr.fLock);

	ESIF_TRACE_EXIT_INFO();
}
Example #4
0
void EsifActMgrExit ()
{
	/* Call before destroying action manager */
	EsifActExit();

	if (NULL != g_actMgr.fActTypes) {
		esif_link_list_destroy(g_actMgr.fActTypes);
	}

	ESIF_TRACE_DEBUG("%s: Exit Action Manager (ACTMGR)", ESIF_FUNC);
}
Example #5
0
static void esif_ccb_tmrm_destroy_timer_node_wlock(
	struct esif_link_list_node *node_ptr
	)
{
	struct esif_tmrm_item *tmrm_item_ptr = NULL;

	ESIF_ASSERT(node_ptr != NULL);
	ESIF_ASSERT(node_ptr->data_ptr != NULL);

	tmrm_item_ptr = (struct esif_tmrm_item *)node_ptr->data_ptr;
	esif_ccb_tmrm_destroy_tmrm_item(tmrm_item_ptr);

	esif_link_list_node_remove(g_tmrm.timer_list_ptr, node_ptr);
			
	/* If the manager list is empty, destroy it */
	if(NULL == g_tmrm.timer_list_ptr->head_ptr) {
		esif_link_list_destroy(g_tmrm.timer_list_ptr);
		g_tmrm.timer_list_ptr = NULL;
	}
	return;
}