Changeset 4224ef7 in mainline for uspace/srv/locsrv


Ignore:
Timestamp:
2019-08-06T18:18:37Z (7 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
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)
Message:

sysman: Add VFS FS server autostart

  • VFS autostart instrumentation removes explicit dependency on FS servers.
  • Compositor service properly named, it's now resolved as implicit dependency.

Conflicts:

boot/Makefile.common
uspace/lib/gui/window.c
uspace/srv/locsrv/locsrv.c
uspace/srv/vfs/vfs.c
uspace/srv/vfs/vfs_ops.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/locsrv/locsrv.c

    rdd5c623 r4224ef7  
    339339        char *service_name = NULL;
    340340
     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         */
    341347        if (str_cmp(ns_name, LOC_DEVICE_NAMESPACE) == 0) {
    342348                asprintf(&service_name, "%s", SERVICE_NAME_DEVMAN);
     
    359365        }
    360366
    361         //printf("%s(%s) before\n", __func__, unit_name);//DEBUG
    362367        int rc = sysman_unit_start(unit_name, IPC_FLAG_BLOCKING);
    363         //printf("%s(%s) after %i\n", __func__, unit_name, rc);//DEBUG
    364368        free(unit_name);
    365369        free(service_name);
     
    811815         */
    812816        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;
    827836                        }
    828 
     837                }
     838
     839                if (flags & IPC_FLAG_BLOCKING) {
    829840                        fibril_condvar_wait(&services_list_cv,
    830841                            &services_list_mutex);
     
    833844                rc = ENOENT;
    834845        } else {
    835                 //printf("%s: service '%s/%s' FOUND\n", NAME, ns_name, name);//DEBUG
    836846                rc = EOK;
    837847        }
     
    16211631
    16221632        /* Let sysman know we are broker */
    1623         printf("%s: sysman_broker_register : pre\n", NAME);
    16241633        rc = sysman_broker_register();
    1625         printf("%s: sysman_broker_register : post\n", NAME);
    16261634        if (rc != EOK) {
    16271635                printf("%s: Error registering at sysman (%i)\n", NAME, rc);
Note: See TracChangeset for help on using the changeset viewer.