Changeset bb154c6 in mainline for uspace/srv/sysman/dep.h


Ignore:
Timestamp:
2019-08-03T08:15:25Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
09a8006
Parents:
6006f35
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-04-15 15:14:58)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-03 08:15:25)
Message:

Add skeleton for configuration files loading

  • Create content of /cfg directory,
  • create sample configuration file,
  • refactored polymorphism.

Conflicts:

boot/Makefile

File:
1 edited

Legend:

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

    r6006f35 rbb154c6  
    66#include "unit.h"
    77
    8 /** Dependency edge between unit in dependency graph */
     8typedef enum {
     9        DEP_EMBRYO,
     10        DEP_VALID
     11} dependency_state_t;
     12
     13/** Dependency edge between unit in dependency graph
     14 *
     15 * @code
     16 * dependant ---> dependency
     17 * @endcode
     18 *
     19 */
    920typedef struct {
     21        /** Link to dependants list */
    1022        link_t dependants;
     23        /** Link to dependencies list */
    1124        link_t dependencies;
     25
     26        dependency_state_t state;
    1227
    1328        /** Unit that depends on another */
    1429        unit_t *dependant;
     30
    1531        /** Unit that is dependency for another */
    1632        unit_t *dependency;
     33
     34        /** Name of the dependency unit, for resolved dependencies it's NULL
     35         *
     36         * @note Either dependency or dependency_name is set. Never both nor
     37         *       none.
     38         */
     39        char *dependency_name;
    1740} unit_dependency_t;
    1841
     42extern unit_dependency_t *dep_dependency_create(void);
     43extern void dep_dependency_destroy(unit_dependency_t **);
     44
     45extern int dep_sprout_dependency(unit_t *, const char *);
     46extern void dep_resolve_dependency(unit_dependency_t *, unit_t *);
     47
    1948extern int dep_add_dependency(unit_t *, unit_t *);
     49extern void dep_remove_dependency(unit_dependency_t **);
     50
    2051
    2152#endif
Note: See TracChangeset for help on using the changeset viewer.