Changeset 4fe7fcb in mainline
- Timestamp:
- 2019-08-03T07:37:38Z (5 years ago)
- Children:
- 6efec7e3
- Parents:
- c0c388d2
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-03-16 22:13:54)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-03 07:37:38)
- Location:
- uspace/srv/sysman
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/job.c
rc0c388d2 r4fe7fcb 212 212 } 213 213 214 int job_add_blocking_job(job_t *job, job_t *blocking_job) 215 { 216 job_link_t *job_link = malloc(sizeof(job_link_t)); 217 if (job_link == NULL) { 218 return ENOMEM; 219 } 220 221 link_initialize(&job_link->link); 222 list_append(&job_link->link, &job->blocking_jobs); 223 224 job_link->job = blocking_job; 225 job_add_ref(blocking_job); 226 227 return EOK; 228 } 229 214 230 static void job_destroy(job_t **job_ptr) 215 231 { -
uspace/srv/sysman/job.h
rc0c388d2 r4fe7fcb 55 55 56 56 extern job_t *job_create(job_type_t type); 57 extern int job_add_blocking_job(job_t *, job_t *); 57 58 58 59 #endif -
uspace/srv/sysman/sysman.c
rc0c388d2 r4fe7fcb 6 6 #include "sysman.h" 7 7 8 /** Create jobs for cluser of given unit. 9 * 10 * @note Using recursion, limits "depth" of dependency graph. 11 */ 8 12 static int sysman_create_closure_jobs(unit_t *unit, job_t **entry_job_ptr, 9 13 list_t *accumulator, job_type_t type) … … 17 21 18 22 job->unit = unit; 19 // TODO set blocking jobs20 23 21 24 list_foreach(unit->dependencies, dependencies, unit_dependency_t, edge) { 22 rc = sysman_create_closure_jobs(edge->dependency, NULL, 25 job_t *blocking_job = NULL; 26 rc = sysman_create_closure_jobs(edge->dependency, &blocking_job, 23 27 accumulator, type); 28 if (rc != EOK) { 29 goto fail; 30 } 31 32 rc = job_add_blocking_job(job, blocking_job); 24 33 if (rc != EOK) { 25 34 goto fail;
Note:
See TracChangeset
for help on using the changeset viewer.