Changeset 4224ef7 in mainline for uspace/srv/locsrv
- Timestamp:
- 2019-08-06T18:18:37Z (7 years ago)
- Children:
- e55741e
- Parents:
- dd5c623
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-05-11 16:50:40)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-06 18:18:37)
- File:
-
- 1 edited
-
uspace/srv/locsrv/locsrv.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/locsrv/locsrv.c
rdd5c623 r4224ef7 339 339 char *service_name = NULL; 340 340 341 /* 342 * All services in 'device' namespace are considered to be drivers and 343 * devman is thus requested to start. Otherwise name of unit is made 344 * from fully qualified name of service (namespace separator is changed 345 * for usage in unit name. 346 */ 341 347 if (str_cmp(ns_name, LOC_DEVICE_NAMESPACE) == 0) { 342 348 asprintf(&service_name, "%s", SERVICE_NAME_DEVMAN); … … 359 365 } 360 366 361 //printf("%s(%s) before\n", __func__, unit_name);//DEBUG362 367 int rc = sysman_unit_start(unit_name, IPC_FLAG_BLOCKING); 363 //printf("%s(%s) after %i\n", __func__, unit_name, rc);//DEBUG364 368 free(unit_name); 365 369 free(service_name); … … 811 815 */ 812 816 if (svc == NULL) { 813 //printf("%s: service '%s/%s' not found\n", NAME, ns_name, name);//DEBUG 814 if (flags & (IPC_FLAG_AUTOSTART | IPC_FLAG_BLOCKING)) { 815 /* TODO: 816 * consider non-blocking service start, return 817 * some dummy id and block only after connection 818 * request (actually makes more sense as those who asks 819 * for ID might be someone else than those connecting) 820 */ 821 if (!start_requested && (flags & IPC_FLAG_AUTOSTART)) { 822 rc = loc_service_request_start(ns_name, name); 823 if (rc != EOK) { 824 goto finish; 825 } 826 start_requested = true; 817 /* TODO: 818 * consider non-blocking service start, return 819 * some dummy id and block only after connection 820 * request (actually makes more sense as those who asks 821 * for ID might be someone else than those connecting) 822 * Note: 823 * service_list_mutex is released as we don't need to keep it 824 * while waiting for start request to finish. 825 */ 826 if ((flags & IPC_FLAG_AUTOSTART) && !start_requested) { 827 fibril_mutex_unlock(&services_list_mutex); 828 rc = loc_service_request_start(ns_name, name); 829 fibril_mutex_lock(&services_list_mutex); 830 start_requested = true; 831 832 if (rc != EOK) { 833 goto finish; 834 } else { 835 goto recheck; 827 836 } 828 837 } 838 839 if (flags & IPC_FLAG_BLOCKING) { 829 840 fibril_condvar_wait(&services_list_cv, 830 841 &services_list_mutex); … … 833 844 rc = ENOENT; 834 845 } else { 835 //printf("%s: service '%s/%s' FOUND\n", NAME, ns_name, name);//DEBUG836 846 rc = EOK; 837 847 } … … 1621 1631 1622 1632 /* Let sysman know we are broker */ 1623 printf("%s: sysman_broker_register : pre\n", NAME);1624 1633 rc = sysman_broker_register(); 1625 printf("%s: sysman_broker_register : post\n", NAME);1626 1634 if (rc != EOK) { 1627 1635 printf("%s: Error registering at sysman (%i)\n", NAME, rc);
Note:
See TracChangeset
for help on using the changeset viewer.
