source:
mainline/uspace/srv/sysman/unit.h@
6efec7e3
Last change on this file since 6efec7e3 was 6efec7e3, checked in by , 6 years ago | |
---|---|
|
|
File size: 642 bytes |
Rev | Line | |
---|---|---|
[f42ee6f] | 1 | #ifndef SYSMAN_UNIT_H |
2 | #define SYSMAN_UNIT_H | |
3 | ||
4 | #include <adt/list.h> | |
[694253c] | 5 | #include <fibril_synch.h> |
[f42ee6f] | 6 | |
7 | #include "unit_mnt.h" | |
8 | #include "unit_cfg.h" | |
[6efec7e3] | 9 | #include "unit_tgt.h" |
10 | #include "unit_types.h" | |
[f42ee6f] | 11 | |
[6efec7e3] | 12 | struct unit { |
[f42ee6f] | 13 | link_t units; |
14 | ||
15 | unit_type_t type; | |
[694253c] | 16 | |
[f42ee6f] | 17 | unit_state_t state; |
[694253c] | 18 | fibril_mutex_t state_mtx; |
19 | fibril_condvar_t state_cv; | |
[f42ee6f] | 20 | |
21 | list_t dependencies; | |
22 | list_t dependants; | |
23 | ||
24 | union { | |
25 | unit_mnt_t mnt; | |
26 | unit_cfg_t cfg; | |
27 | } data; | |
[6efec7e3] | 28 | }; |
[f42ee6f] | 29 | |
30 | ||
31 | extern unit_t *unit_create(unit_type_t); | |
32 | extern void unit_destroy(unit_t **); | |
33 | ||
[6efec7e3] | 34 | // TODO add flags argument with explicit notification? |
35 | extern void unit_set_state(unit_t *, unit_state_t); | |
36 | ||
[694253c] | 37 | extern int unit_start(unit_t *); |
[f42ee6f] | 38 | |
39 | #endif |
Note:
See TracBrowser
for help on using the repository browser.