Changeset 694253c in mainline for uspace/srv/sysman/dep.c


Ignore:
Timestamp:
2019-08-03T07:35:41Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
c0c388d2
Parents:
f42ee6f
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-03-13 02:06:30)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-03 07:35:41)
Message:

Skeleton for sysman (unit) jobs control

File:
1 edited

Legend:

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

    rf42ee6f r694253c  
    1010int dep_add_dependency(unit_t *dependant, unit_t *dependency)
    1111{
    12         unit_dependency_t *edge = malloc(sizeof(unit_t));
     12        unit_dependency_t *edge = malloc(sizeof(unit_dependency_t));
    1313        if (edge == NULL) {
    1414                return ENOMEM;
    1515        }
     16        link_initialize(&edge->dependants);
     17        link_initialize(&edge->dependencies);
     18
    1619        // TODO check existence of the edge
    1720        // TODO locking
    1821        // TODO check types and states of connected units
    19         /* Do not initalize links as they are immediately inserted into list */
    2022        list_append(&edge->dependants, &dependency->dependants);
    2123        list_append(&edge->dependencies, &dependant->dependencies);
Note: See TracChangeset for help on using the changeset viewer.