Changeset 694253c in mainline for uspace/srv/sysman/unit.c
- Timestamp:
- 2019-08-03T07:35:41Z (5 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/unit.c
rf42ee6f r694253c 1 1 #include <assert.h> 2 #include <errno.h> 3 #include <fibril_synch.h> 2 4 #include <mem.h> 5 #include <stdio.h> 3 6 #include <stdlib.h> 4 7 … … 9 12 assert(unit); 10 13 11 memset(unit, 0, sizeof(unit)); 14 link_initialize(&unit->units); 15 16 unit->type = type; 17 unit->state = STATE_EMBRYO; 18 fibril_mutex_initialize(&unit->state_mtx); 19 fibril_condvar_initialize(&unit->state_cv); 12 20 13 link_initialize(&unit->units);14 21 list_initialize(&unit->dependants); 15 22 list_initialize(&unit->dependencies); 16 17 unit->type = type;18 unit->state = STATE_EMBRYO;19 23 } 20 24 … … 42 46 *unit = NULL; 43 47 } 48 49 /** Issue request to restarter to start a unit 50 * 51 * Return from this function only means start request was issued. 52 * If you need to wait for real start of the unit, use waiting on state_cv. 53 */ 54 int unit_start(unit_t *unit) 55 { 56 // TODO actually start the unit 57 printf("Starting unit of type %i\n", unit->type); 58 return EOK; 59 }
Note:
See TracChangeset
for help on using the changeset viewer.