コード例 #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();
}
コード例 #2
0
ファイル: esif_lf_event.c プロジェクト: qbbian/dptf
/* Exit */
void esif_event_exit(void)
{
	esif_queue_destroy(g_event_queue);

	esif_ccb_lock_uninit(&g_event_lock);

	ESIF_TRACE_DYN_INIT("%s: Exit Event\n", ESIF_FUNC);
}