예제 #1
0
void EsifAppMgrExit()
{
	u8 i = 0;
	EsifAppPtr a_app_ptr = NULL;

	ESIF_TRACE_ENTRY_INFO();

	EsifEventMgr_UnregisterEventByType(ESIF_EVENT_PARTICIPANT_SUSPEND, EVENT_MGR_MATCH_ANY, EVENT_MGR_DOMAIN_D0, EsifAppMgr_EventCallback, NULL);
	EsifEventMgr_UnregisterEventByType(ESIF_EVENT_PARTICIPANT_RESUME, EVENT_MGR_MATCH_ANY, EVENT_MGR_DOMAIN_D0, EsifAppMgr_EventCallback, NULL);

	EsifAppExit();
	ESIF_TRACE_DEBUG("Exit Action Manager (APPMGR)");

	esif_ccb_read_lock(&g_appMgr.fLock);
	for (i = 0; i < ESIF_MAX_APPS; i++) {
		a_app_ptr = &g_appMgr.fEntries[i];

		// Attempt to gracefully shutdown App before forcing library unload
		if (a_app_ptr->fLibNamePtr != NULL) {
			EsifAppStop(a_app_ptr);
		}
		if (a_app_ptr->fLibNamePtr != NULL) {
			esif_ccb_library_unload(a_app_ptr->fLibHandle);
			esif_ccb_free(a_app_ptr->fLibNamePtr);
			esif_ccb_memset(a_app_ptr, 0, sizeof(*a_app_ptr));
		}
	}
	esif_ccb_read_unlock(&g_appMgr.fLock);

	esif_ccb_lock_uninit(&g_appMgr.fLock);

	ESIF_TRACE_EXIT_INFO();
}
예제 #2
0
파일: esif_uf_action.c 프로젝트: 01org/dptf
static void EsifActIface_UnregisterEvents(
	EsifActIfacePtr self,
	esif_handle_t esifInstHandle
	)
{
	eEsifError rc = ESIF_OK;

	ESIF_ASSERT(self != NULL);

	switch (self->hdr.fIfaceVersion) {
	case ESIF_ACT_IFACE_VER_V1:
		if (NULL == self->actIfaceV1.rcvEventFuncPtr) {
			rc = ESIF_E_NOT_SUPPORTED;
			goto exit;
		}
		EsifEventMgr_UnregisterEventByType(ESIF_EVENT_LOG_VERBOSITY_CHANGED, EVENT_MGR_MATCH_ANY, EVENT_MGR_DOMAIN_D0, EsifAct_EventCallback, (void *)(size_t)esifInstHandle);
		break;
	case ESIF_ACT_IFACE_VER_STATIC:
	default:
		break;
	}
exit:
	return;
}