Changeset bb154c6 in mainline for uspace/srv/sysman/dep.h
- Timestamp:
- 2019-08-03T08:15:25Z (6 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/dep.h
r6006f35 rbb154c6 6 6 #include "unit.h" 7 7 8 /** Dependency edge between unit in dependency graph */ 8 typedef 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 */ 9 20 typedef struct { 21 /** Link to dependants list */ 10 22 link_t dependants; 23 /** Link to dependencies list */ 11 24 link_t dependencies; 25 26 dependency_state_t state; 12 27 13 28 /** Unit that depends on another */ 14 29 unit_t *dependant; 30 15 31 /** Unit that is dependency for another */ 16 32 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; 17 40 } unit_dependency_t; 18 41 42 extern unit_dependency_t *dep_dependency_create(void); 43 extern void dep_dependency_destroy(unit_dependency_t **); 44 45 extern int dep_sprout_dependency(unit_t *, const char *); 46 extern void dep_resolve_dependency(unit_dependency_t *, unit_t *); 47 19 48 extern int dep_add_dependency(unit_t *, unit_t *); 49 extern void dep_remove_dependency(unit_dependency_t **); 50 20 51 21 52 #endif
Note:
See TracChangeset
for help on using the changeset viewer.