Lines Matching refs:domain

223 extern int listener_android_domain_init(int domain);
224 extern void listener_android_domain_deinit(int domain);
225 extern int initFileWatcher(int domain);
226 extern void deinitFileWatcher(int domain);
227 static int open_dev(int domain);
228 static void domain_deinit(int domain);
230 remote_handle64 get_adsp_current_process1_handle(int domain);
231 remote_handle64 get_adspmsgd_adsp1_handle(int domain);
575 static int get_domain_from_handle(remote_handle64 local, int *domain) { in get_domain_from_handle() argument
582 *domain = dom; in get_domain_from_handle()
591 int domain = DEFAULT_DOMAIN_ID; in get_domain_from_name() local
595 domain = ADSP_DOMAIN_ID; in get_domain_from_name()
597 domain = MDSP_DOMAIN_ID; in get_domain_from_name()
599 domain = SDSP_DOMAIN_ID; in get_domain_from_name()
601 domain = CDSP_DOMAIN_ID; in get_domain_from_name()
603 domain = INVALID_DOMAIN_ID; in get_domain_from_name()
607 domain = domain | FASTRPC_SESSION_ID1; in get_domain_from_name()
610 VERIFY_IPRINTF("get_domain_from_name: %d\n", domain); in get_domain_from_name()
611 return domain; in get_domain_from_name()
614 static int alloc_handle(int domain, remote_handle64 remote, struct handle_info **info) { in alloc_handle() argument
621 hinfo->hlist = &hlist[domain]; in alloc_handle()
623 pthread_mutex_lock(&hlist[domain].mut); in alloc_handle()
624 QList_PrependNode(&hlist[domain].ql, &hinfo->qn); in alloc_handle()
625 pthread_mutex_unlock(&hlist[domain].mut); in alloc_handle()
630 FARF(ERROR, "Error %x: alloc handle failed. domain %d\n", nErr, domain); in alloc_handle()
636 static int is_last_handle(int domain) { in is_last_handle() argument
640 pthread_mutex_lock(&hlist[domain].mut); in is_last_handle()
641 if(!(hlist[domain].domainsupport && !hlist[domain].nondomainsupport)){ in is_last_handle()
646 if (!QList_IsEmpty(&hlist[domain].ql)) { in is_last_handle()
648 QLIST_FOR_ALL(&hlist[domain].ql, pn) { in is_last_handle()
656 pthread_mutex_unlock(&hlist[domain].mut); in is_last_handle()
658 VERIFY_IPRINTF("Error %x: is_last_handle %d failed\n", nErr, domain); in is_last_handle()
693 void set_thread_context(int domain) { in set_thread_context() argument
695 pthread_setspecific(tlsKey, (void*)&hlist[domain]); in set_thread_context()
700 int domain; in get_domain_id() local
704 domain = (int)(list - &hlist[0]); in get_domain_id()
706 domain = DEFAULT_DOMAIN_ID; in get_domain_id()
708 return domain; in get_domain_id()
713 int domain, nErr = 0; in is_smmu_enabled() local
717 domain = (int)(list - &hlist[0]); in is_smmu_enabled()
718 VERIFY((domain >= 0) && (domain < NUM_DOMAINS_EXTEND)); in is_smmu_enabled()
719 return hlist[domain].info & FASTRPC_INFO_SMMU; in is_smmu_enabled()
749 int remote_handle_invoke_domain(int domain, remote_handle handle, uint32_t sc, remote_arg* pra) { in remote_handle_invoke_domain() argument
759 VERIFYC(-1 != (dev = open_dev(domain)), AEE_EINVALIDDEVICE); in remote_handle_invoke_domain()
760 list = &hlist[domain]; in remote_handle_invoke_domain()
804 int domain = DEFAULT_DOMAIN_ID, nErr = AEE_SUCCESS; in remote_handle_invoke() local
810 domain = (int)(list - &hlist[0]); in remote_handle_invoke()
811 VERIFYC((domain >= 0) && (domain < NUM_DOMAINS_EXTEND), AEE_EINVALIDDOMAIN); in remote_handle_invoke()
813 domain = DEFAULT_DOMAIN_ID; in remote_handle_invoke()
815 VERIFY(AEE_SUCCESS == (nErr = remote_handle_invoke_domain(domain, handle, sc, pra))); in remote_handle_invoke()
818 …emote handle invoke failed. domain %d, handle %x, sc %x, pra %p\n", nErr, domain, handle, sc, pra); in remote_handle_invoke()
825 int nErr = AEE_SUCCESS, domain = DEFAULT_DOMAIN_ID; in remote_handle64_invoke() local
828 VERIFY(AEE_SUCCESS == (nErr = get_domain_from_handle(local, &domain))); in remote_handle64_invoke()
830 VERIFY(AEE_SUCCESS == (nErr = remote_handle_invoke_domain(domain, remote, sc, pra))); in remote_handle64_invoke()
833 …ote handle64 invoke failed. domain %d, handle %p, sc %x, pra %p\n", nErr, domain, &local, sc, pra); in remote_handle64_invoke()
838 int listener_android_geteventfd(int domain, int *fd);
839 int remote_handle_open_domain(int domain, const char* name, remote_handle *ph) in remote_handle_open_domain() argument
845 return listener_android_geteventfd(domain, (int *)ph); in remote_handle_open_domain()
848 FARF(HIGH, "setting attach mode to guestos : %d\n", domain); in remote_handle_open_domain()
850 hlist[domain].dsppd = GUEST_OS; in remote_handle_open_domain()
854 FARF(HIGH, "creating static pd on domain: %d\n", domain); in remote_handle_open_domain()
857 hlist[domain].dsppdname = (char *)malloc((std_strlen(pdName) + 1)*(sizeof(char))); in remote_handle_open_domain()
858 VERIFYC(NULL != hlist[domain].dsppdname, AEE_ENOMEMORY); in remote_handle_open_domain()
859 std_strlcpy(hlist[domain].dsppdname, pdName, std_strlen(pdName) + 1); in remote_handle_open_domain()
861 hlist[domain].dsppd = STATIC_USER_PD; in remote_handle_open_domain()
863 hlist[domain].dsppd = ATTACH_SENSORS_PD; in remote_handle_open_domain()
865 hlist[domain].dsppd = GUEST_OS_SHARED; in remote_handle_open_domain()
870 FARF(HIGH, "setting attach mode to userpd : %d\n", domain); in remote_handle_open_domain()
872 hlist[domain].dsppd = USER_PD; in remote_handle_open_domain()
875 VERIFYC(-1 != open_dev(domain), AEE_EINVALIDDEVICE); in remote_handle_open_domain()
882 …remote handle open domain failed. domain %d, name %s, dlerror %s\n", nErr, domain, name, dlerrstr); in remote_handle_open_domain()
885 if (hlist[domain].dsppdname != NULL) in remote_handle_open_domain()
887 free(hlist[domain].dsppdname); in remote_handle_open_domain()
888 hlist[domain].dsppdname = NULL; in remote_handle_open_domain()
894 int nErr = 0, domain; in remote_handle_open() local
895 domain = DEFAULT_DOMAIN_ID; in remote_handle_open()
896 VERIFY(!remote_handle_open_domain(domain, name, ph)); in remote_handle_open()
897 hlist[domain].nondomainsupport = 1; in remote_handle_open()
906 int domain, nErr = 0; in remote_handle64_open() local
908 domain = get_domain_from_name(name); in remote_handle64_open()
909 VERIFYC(domain >= 0, AEE_EINVALIDDOMAIN); in remote_handle64_open()
911 VERIFY(AEE_SUCCESS == (nErr = remote_handle_open_domain(domain, name, &h))); in remote_handle64_open()
912 hlist[domain].domainsupport = 1; in remote_handle64_open()
913 VERIFY(AEE_SUCCESS == (nErr = alloc_handle(domain, h, &hinfo))); in remote_handle64_open()
940 int domain, nErr = AEE_SUCCESS; in remote_handle64_close() local
942 VERIFY(AEE_SUCCESS == (nErr = get_domain_from_handle(handle, &domain))); in remote_handle64_close()
944 set_thread_context(domain); in remote_handle64_close()
948 if (is_last_handle(domain)) { in remote_handle64_close()
949 domain_deinit(domain); in remote_handle64_close()
957 int manage_pm_qos(int domain, remote_handle64 h, uint32_t enable, uint32_t latency) { in manage_pm_qos() argument
964 if (!hlist || (hlist && hlist[domain].dev == -1)) in manage_pm_qos()
965 VERIFYC(-1 != open_dev(domain), AEE_EINVALIDDEVICE); in manage_pm_qos()
968 VERIFY(hlist[domain].dev != -1); in manage_pm_qos()
970 qos = &hlist[domain].qos; in manage_pm_qos()
994 int manage_adaptive_qos(int domain, uint32_t enable) { in manage_adaptive_qos() argument
1000 if ((enable && hlist[domain].qos.adaptive_qos) || (!enable && !hlist[domain].qos.adaptive_qos)) in manage_adaptive_qos()
1003 if (hlist[domain].dev != -1) { in manage_adaptive_qos()
1008 __func__, enable, domain); in manage_adaptive_qos()
1011 hlist[domain].qos.adaptive_qos = ((enable == FASTRPC_ADAPTIVE_QOS)? 1:0); in manage_adaptive_qos()
1015 hlist[domain].qos.adaptive_qos = ((enable == FASTRPC_ADAPTIVE_QOS)? 1:0); in manage_adaptive_qos()
1019 FARF(ALWAYS, "%s: Successfully enabled adaptive QoS on domain %d", __func__, domain); in manage_adaptive_qos()
1021 FARF(ALWAYS, "%s: Disabled adaptive QoS on domain %d", __func__, domain); in manage_adaptive_qos()
1026 int remote_handle_control_domain(int domain, remote_handle64 h, uint32_t req, void* data, uint32_t … in remote_handle_control_domain() argument
1040 VERIFY(AEE_SUCCESS == (nErr = manage_adaptive_qos(domain, FASTRPC_DISABLE_QOS))); in remote_handle_control_domain()
1041 VERIFY(AEE_SUCCESS == (nErr = manage_pm_qos(domain, h, FASTRPC_DISABLE_QOS, lp->latency))); in remote_handle_control_domain()
1046 VERIFY(AEE_SUCCESS == (nErr = manage_adaptive_qos(domain, FASTRPC_DISABLE_QOS))); in remote_handle_control_domain()
1047 VERIFY(AEE_SUCCESS == (nErr = manage_pm_qos(domain, h, FASTRPC_PM_QOS, lp->latency))); in remote_handle_control_domain()
1053 VERIFY(AEE_SUCCESS == (nErr = manage_pm_qos(domain, h, FASTRPC_DISABLE_QOS, lp->latency))); in remote_handle_control_domain()
1054 VERIFY(AEE_SUCCESS == (nErr = manage_adaptive_qos(domain, FASTRPC_ADAPTIVE_QOS))); in remote_handle_control_domain()
1071 FARF(ERROR, "Error 0x%x: %s failed for request ID %d on domain %d", nErr, __func__, req, domain); in remote_handle_control_domain()
1077 int domain = DEFAULT_DOMAIN_ID, nErr = AEE_SUCCESS; in remote_handle_control() local
1079 VERIFY(AEE_SUCCESS == (nErr = remote_handle_control_domain(domain, -1, req, data, len))); in remote_handle_control()
1087 int nErr = AEE_SUCCESS, domain = 0; in remote_handle64_control() local
1089 VERIFY(AEE_SUCCESS == (nErr = get_domain_from_handle(handle, &domain))); in remote_handle64_control()
1090 VERIFY(AEE_SUCCESS == (nErr = remote_handle_control_domain(domain, handle, req, data, len))); in remote_handle64_control()
1098 static int store_domain_thread_params(int domain, struct remote_rpc_thread_params *params, uint32_t… in store_domain_thread_params() argument
1102 if (hlist[domain].dev != -1) { in store_domain_thread_params()
1105 __func__, domain); in store_domain_thread_params()
1118 hlist[domain].th_params.prio = (uint32_t) params->prio; in store_domain_thread_params()
1130 hlist[domain].th_params.stack_size = (uint32_t) params->stack_size; in store_domain_thread_params()
1132 hlist[domain].th_params.reqID = req; in store_domain_thread_params()
1135 FARF(ERROR, "Error 0x%x: %s failed for domain %d", nErr, __func__, domain); in store_domain_thread_params()
1156 if (params->domain != -1) { in remote_session_control()
1157 if ((params->domain < 0) || (params->domain >= NUM_DOMAINS_EXTEND)) { in remote_session_control()
1159 FARF(ERROR, "%s: Invalid domain ID %d passed", __func__, params->domain); in remote_session_control()
1162 VERIFY(AEE_SUCCESS == (nErr = store_domain_thread_params(params->domain, params, req))); in remote_session_control()
1177 …ARF (HIGH, "%s Unsigned module offload enable %d for domain %d", __func__, um->enable, um->domain); in remote_session_control()
1178 if (um->domain != -1) { in remote_session_control()
1179 VERIFYC((um->domain >= 0) && (um->domain < NUM_DOMAINS_EXTEND), AEE_EINVALIDDOMAIN); in remote_session_control()
1180 hlist[um->domain].unsigned_module = um->enable? 1 :0 ; in remote_session_control()
1203 int dev, domain, nErr = AEE_SUCCESS; in remote_mmap64() local
1207 domain = (int)(list - &hlist[0]); in remote_mmap64()
1208 VERIFYC((domain >= 0) && (domain < NUM_DOMAINS_EXTEND), AEE_EINVALIDDOMAIN); in remote_mmap64()
1209 VERIFYC(-1 != (dev = open_dev(domain)), AEE_EINVALIDDEVICE); in remote_mmap64()
1231 int dev, domain, nErr = AEE_SUCCESS; in remote_munmap64() local
1235 domain = (int)(list - &hlist[0]); in remote_munmap64()
1236 VERIFYC((domain >= 0) && (domain < NUM_DOMAINS_EXTEND), AEE_EINVALIDDOMAIN); in remote_munmap64()
1237 VERIFYC(-1 != (dev = open_dev(domain)), AEE_EINVALIDDEVICE); in remote_munmap64()
1305 static int attach_guestos(int domain) { in attach_guestos() argument
1308 switch(domain & DOMAIN_ID_MASK) { in attach_guestos()
1323 static void domain_deinit(int domain) { in domain_deinit() argument
1331 pthread_mutex_lock(&hlist[domain].mut); in domain_deinit()
1332 FARF(HIGH, "domain_deinit for domain %d: dev %d \n", domain, hlist[domain].dev); in domain_deinit()
1333 if(hlist[domain].dev != -1) { in domain_deinit()
1334 handle = get_adsp_current_process1_handle(domain); in domain_deinit()
1341 listener_android_domain_deinit(domain); in domain_deinit()
1342 deinitFileWatcher(domain); in domain_deinit()
1344 fastrpc_latency_deinit(&hlist[domain].qos); in domain_deinit()
1345 while((pn = QList_Pop(&hlist[domain].ql))) { in domain_deinit()
1350 hlist[domain].cphandle = 0; in domain_deinit()
1351 hlist[domain].msghandle = 0; in domain_deinit()
1352 hlist[domain].domainsupport = 0; in domain_deinit()
1353 hlist[domain].nondomainsupport = 0; in domain_deinit()
1354 hlist[domain].initialized = 0; in domain_deinit()
1355 hlist[domain].dsppd = attach_guestos(domain); in domain_deinit()
1356 if (hlist[domain].dsppdname != NULL) in domain_deinit()
1358 free(hlist[domain].dsppdname); in domain_deinit()
1359 hlist[domain].dsppdname = NULL; in domain_deinit()
1362 FARF(HIGH, "exit: closing %d, rpc errors are expected.\n", domain); in domain_deinit()
1364 if (close(hlist[domain].dev)) in domain_deinit()
1365 FARF(ERROR, "exit: failed to close file descriptor for domain %d\n", domain); in domain_deinit()
1367 hlist[domain].dev = -1; in domain_deinit()
1369 if(hlist[domain].pdmem) { in domain_deinit()
1370 rpcmem_free_internal(hlist[domain].pdmem); in domain_deinit()
1371 hlist[domain].pdmem = NULL; in domain_deinit()
1373 pthread_mutex_unlock(&hlist[domain].mut); in domain_deinit()
1380 int domain = domain_id & DOMAIN_ID_MASK; in get_domain_name() local
1382 switch (domain) { in get_domain_name()
1408 int domain = domain_id & DOMAIN_ID_MASK; in get_secure_domain_name() local
1410 switch (domain) { in get_secure_domain_name()
1444 int domain = domain_id & DOMAIN_ID_MASK; in open_device_node_internal() local
1446 switch (domain) { in open_device_node_internal()
1450 dev = open(get_secure_domain_name(domain), O_NONBLOCK); in open_device_node_internal()
1454 get_secure_domain_name(domain), domain, strerror(errno), in open_device_node_internal()
1455 get_domain_name(domain)); in open_device_node_internal()
1456 dev = open(get_domain_name(domain), O_NONBLOCK); in open_device_node_internal()
1460 get_domain_name(domain), domain, strerror(errno), in open_device_node_internal()
1469 get_secure_domain_name(domain), domain, strerror(errno), in open_device_node_internal()
1475 dev = open(get_domain_name(domain), O_NONBLOCK); in open_device_node_internal()
1479 get_domain_name(domain), domain, strerror(errno), in open_device_node_internal()
1480 get_secure_domain_name(domain)); in open_device_node_internal()
1481 dev = open(get_secure_domain_name(domain), O_NONBLOCK); in open_device_node_internal()
1490 domain, strerror(errno)); in open_device_node_internal()
1496 static int get_process_attrs(int domain) { in get_process_attrs() argument
1507 attrs |= hlist[domain].qos.adaptive_qos ? FASTRPC_MODE_ADAPTIVE_QOS : 0; in get_process_attrs()
1508 attrs |= hlist[domain].unsigned_module ? FASTRPC_MODE_UNSIGNED_MODULE : 0; in get_process_attrs()
1533 int is_kernel_alloc_supported(int dev, int domain) { in is_kernel_alloc_supported() argument
1543 int domain = domain_id & DOMAIN_ID_MASK; in open_shell() local
1550 if (domain == MDSP_DOMAIN_ID) { in open_shell()
1553 VERIFYC(NULL != (domain_str = (char*)malloc(sizeof(domain))), AEE_ENOMEMORY); in open_shell()
1554 snprintf(domain_str, sizeof(domain), "%d",domain); in open_shell()
1578 FARF(HIGH, "Searching for %s%d ...", shell_name, domain); in open_shell()
1597 if (domain == SDSP_DOMAIN_ID && fh != NULL) { in open_shell()
1601 FARF(ERROR, "open_shell failed with err %d domain %d\n", nErr, domain); in open_shell()
1607 int open_device_node(int domain) { in open_device_node() argument
1612 pthread_mutex_lock(&hlist[domain].mut); in open_device_node()
1613 if(hlist[domain].dev == -1) { in open_device_node()
1614 hlist[domain].dev = open_device_node_internal(domain); in open_device_node()
1616 hlist[domain].initialized = 0; in open_device_node()
1618 pthread_mutex_unlock(&hlist[domain].mut); in open_device_node()
1620 return hlist[domain].dev; in open_device_node()
1623 static int apps_dev_init(int domain) { in apps_dev_init() argument
1628 uint32_t info = domain & DOMAIN_ID_MASK; in apps_dev_init()
1630 FARF(HIGH, "starting %s for domain %d", __func__, domain); in apps_dev_init()
1631 pthread_mutex_lock(&hlist[domain].mut); in apps_dev_init()
1632 pthread_setspecific(tlsKey, (void*)&hlist[domain]); in apps_dev_init()
1633 battach = hlist[domain].dsppd; in apps_dev_init()
1634 if(!hlist[domain].initialized) { in apps_dev_init()
1635 if (hlist[domain].dev == -1) in apps_dev_init()
1636 hlist[domain].dev = open_device_node_internal(domain); in apps_dev_init()
1638 VERIFYC(hlist[domain].dev >= 0, AEE_EFOPEN); in apps_dev_init()
1639 …: device %d opened with info 0x%x (attach %d)", __func__, hlist[domain].dev, hlist[domain].info, b… in apps_dev_init()
1640 hlist[domain].initialized = 1; in apps_dev_init()
1643 FARF(HIGH, "%s: attaching to guest OS for domain %d", __func__, domain); in apps_dev_init()
1644 VERIFY(!ioctl(hlist[domain].dev, FASTRPC_IOCTL_INIT_ATTACH) || errno == ENOTTY); in apps_dev_init()
1653 VERIFY(0 == open_shell(domain, &fh, hlist[domain].unsigned_module)); in apps_dev_init()
1655 hlist[domain].procattrs = get_process_attrs(domain); in apps_dev_init()
1656 if (IS_DEBUG_MODE_ENABLED(hlist[domain].procattrs)) in apps_dev_init()
1663 pthread_mutex_unlock(&hlist[domain].mut); in apps_dev_init()
1667 pthread_mutex_lock(&hlist[domain].mut); in apps_dev_init()
1677 uproc.attrs = hlist[domain].procattrs; in apps_dev_init()
1684 nErr = ioctl(hlist[domain].dev, FASTRPC_IOCTL_INIT_CREATE, (unsigned long)&uproc); in apps_dev_init()
1686 …FARF(HIGH, "Successfully created user PD on domain %d (attrs 0x%x)", domain, hlist[domain].procatt… in apps_dev_init()
1693 pthread_mutex_unlock(&hlist[domain].mut); in apps_dev_init()
1701 domain_deinit(domain); in apps_dev_init()
1702 …FARF(ERROR, "Error 0x%x: %s failed for domain %d, errno %s\n", nErr, __func__, domain, strerror(er… in apps_dev_init()
1704 FARF(HIGH, "Done with %s, err: 0x%x, dev: %d", __func__, nErr, hlist[domain].dev); in apps_dev_init()
1718 remote_handle64 get_adsp_current_process1_handle(int domain) { in get_adsp_current_process1_handle() argument
1722 VERIFYC(hlist[domain].domainsupport, AEE_EBADDOMAIN); in get_adsp_current_process1_handle()
1723 if(hlist[domain].cphandle) { in get_adsp_current_process1_handle()
1724 return hlist[domain].cphandle; in get_adsp_current_process1_handle()
1726 … VERIFY(AEE_SUCCESS == (nErr = alloc_handle(domain, _const_adsp_current_process1_handle, &hinfo))); in get_adsp_current_process1_handle()
1727 hlist[domain].cphandle = hinfo->local; in get_adsp_current_process1_handle()
1728 return hlist[domain].cphandle; in get_adsp_current_process1_handle()
1731 if (hlist[domain].domainsupport) in get_adsp_current_process1_handle()
1732 FARF(ERROR, "Error %x: adsp current process handle failed. domain %d\n", nErr, domain); in get_adsp_current_process1_handle()
1733 else if (!hlist[domain].nondomainsupport) in get_adsp_current_process1_handle()
1734 FARF(ERROR, "Error %x: adsp current process handle failed. domain %d\n", nErr, domain); in get_adsp_current_process1_handle()
1739 remote_handle64 get_adspmsgd_adsp1_handle(int domain) { in get_adspmsgd_adsp1_handle() argument
1743 VERIFYC(hlist[domain].domainsupport, AEE_EBADDOMAIN); in get_adspmsgd_adsp1_handle()
1744 if(hlist[domain].msghandle) { in get_adspmsgd_adsp1_handle()
1745 return hlist[domain].msghandle; in get_adspmsgd_adsp1_handle()
1747 VERIFY(AEE_SUCCESS == (nErr = alloc_handle(domain, _const_adspmsgd_adsp1_handle, &hinfo))); in get_adspmsgd_adsp1_handle()
1748 hlist[domain].msghandle = hinfo->local; in get_adspmsgd_adsp1_handle()
1749 return hlist[domain].msghandle; in get_adspmsgd_adsp1_handle()
1752 FARF(ERROR,"Error %x: get adsp msgd handle failed. domain %d\n", nErr, domain); in get_adspmsgd_adsp1_handle()
1757 static int open_dev(int domain) { in open_dev() argument
1761 if(hlist && hlist[domain].dev != -1 && hlist[domain].initialized) { in open_dev()
1763 pthread_setspecific(tlsKey, (void*)&hlist[domain]); in open_dev()
1770 pthread_mutex_lock(&hlist[domain].init); in open_dev()
1771 if(hlist && hlist[domain].dev != -1 && hlist[domain].initialized) { in open_dev()
1774 VERIFY(AEE_SUCCESS == (nErr = apps_dev_init(domain))); in open_dev()
1775 VERIFY(AEE_SUCCESS == (nErr = listener_android_domain_init(domain))); in open_dev()
1776 initFileWatcher(domain); // Ignore errors in open_dev()
1778 fastrpc_perf_init(hlist[domain].dev); in open_dev()
1779 VERIFY(AEE_SUCCESS == (nErr = fastrpc_latency_init(hlist[domain].dev, &hlist[domain].qos))); in open_dev()
1781 …if (hlist[domain].th_params.prio != DEFAULT_UTHREAD_PRIORITY || hlist[domain].th_params.stack_size… in open_dev()
1782 struct fastrpc_thread_params *uthread_params = &hlist[domain].th_params; in open_dev()
1792 pthread_mutex_unlock(&hlist[domain].init); in open_dev()
1795 domain_deinit(domain); in open_dev()
1797 FARF(ERROR, "Error %x: open dev %d for domain %d failed\n", nErr, hlist[domain].dev, domain); in open_dev()
1801 FARF(HIGH, "done open dev %d err %d", hlist[domain].dev, nErr); in open_dev()
1802 return hlist[domain].dev; in open_dev()
1839 int domain; in exit_thread() local
1844 domain = (int)(list - &hlist[0]); in exit_thread()
1845 if(hlist[domain].dev != -1) { in exit_thread()
1846 FARF(HIGH, "exiting thread domain: %d", domain); in exit_thread()
1847 if((domain < NUM_DOMAINS_EXTEND) && in exit_thread()
1848 (handle = get_adsp_current_process1_handle(domain)) != INVALID_HANDLE) { in exit_thread()
1850 } else if (domain == DEFAULT_DOMAIN_ID) { in exit_thread()