Changeset 4fe7fcb in mainline for uspace/srv/sysman/sysman.c


Ignore:
Timestamp:
2019-08-03T07:37:38Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
6efec7e3
Parents:
c0c388d2
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-03-16 22:13:54)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-03 07:37:38)
Message:

Transform unit dependencies to job ordering

File:
1 edited

Legend:

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

    rc0c388d2 r4fe7fcb  
    66#include "sysman.h"
    77
     8/** Create jobs for cluser of given unit.
     9 *
     10 * @note Using recursion, limits "depth" of dependency graph.
     11 */
    812static int sysman_create_closure_jobs(unit_t *unit, job_t **entry_job_ptr,
    913    list_t *accumulator, job_type_t type)
     
    1721
    1822        job->unit = unit;
    19         // TODO set blocking jobs
    2023
    2124        list_foreach(unit->dependencies, dependencies, unit_dependency_t, edge) {
    22                 rc = sysman_create_closure_jobs(edge->dependency, NULL,
     25                job_t *blocking_job = NULL;
     26                rc = sysman_create_closure_jobs(edge->dependency, &blocking_job,
    2327                    accumulator, type);
     28                if (rc != EOK) {
     29                        goto fail;
     30                }
     31               
     32                rc = job_add_blocking_job(job, blocking_job);
    2433                if (rc != EOK) {
    2534                        goto fail;
Note: See TracChangeset for help on using the changeset viewer.