Ejemplo n.º 1
0
void EsifEventMgr_Exit(void)
{
	UInt8 i;
	EsifLinkListPtr listPtr = NULL;

	ESIF_TRACE_ENTRY_INFO();

	/* Remove all listeners */
	esif_ccb_write_lock(&g_EsifEventMgr.listLock);

	for (i = 0; i < NUM_EVENT_LISTS; i++) {
		listPtr = g_EsifEventMgr.observerLists[i];
		esif_link_list_free_data_and_destroy(listPtr, EsifEventMgr_LLEntryDestroyCallback);
		g_EsifEventMgr.observerLists[i] = NULL;
	}

	esif_ccb_write_unlock(&g_EsifEventMgr.listLock);

	/* Destroy the event thread */

	/* Event thread should already be destroyed in the disable func. Destroy the queue */
	esif_queue_destroy(g_EsifEventMgr.eventQueuePtr, EsifEventMgr_QueueDestroyCallback);
	g_EsifEventMgr.eventQueuePtr = NULL;


	/* Destroy the garbage list */
	esif_ccb_write_lock(&g_EsifEventMgr.listLock);
	esif_link_list_free_data_and_destroy(g_EsifEventMgr.garbageList, EsifEventMgr_LLEntryDestroyCallback);
	g_EsifEventMgr.garbageList = NULL;
	esif_ccb_write_unlock(&g_EsifEventMgr.listLock);

	esif_ccb_lock_uninit(&g_EsifEventMgr.listLock);

	ESIF_TRACE_EXIT_INFO();
}
Ejemplo n.º 2
0
void EsifActMgrExit()
{
	ESIF_TRACE_ENTRY_INFO();

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

	esif_ccb_write_lock(&g_actMgr.mgrLock);

	esif_link_list_free_data_and_destroy(g_actMgr.actions, EsifActMgr_LLEntryDestroyCallback);
	g_actMgr.actions = NULL;

	esif_link_list_free_data_and_destroy(g_actMgr.possibleActions, EsifActMgr_LLEntryDestroyCallback);
	g_actMgr.possibleActions = NULL;

	esif_ccb_write_unlock(&g_actMgr.mgrLock);

	esif_ccb_lock_uninit(&g_actMgr.mgrLock);

	ESIF_TRACE_EXIT_INFO();
}
Ejemplo n.º 3
0
static void esif_ccb_tmrm_destroy_tmrm_item(
	struct esif_tmrm_item *self
	)
{
	if (NULL == self)
		goto exit;

	esif_link_list_free_data_and_destroy(self->destroy_list_ptr, esif_ccb_tmrm_signal_waiters);

	if (self->timer_obj_ptr !=  NULL)
		esif_ccb_timer_obj_destroy(self->timer_obj_ptr);

	esif_ccb_free(self);
exit:
	return;
}