Changeset 8d74fdd in mainline for uspace/srv/sysman/sysman.c
- Timestamp:
- 2019-08-17T13:57:05Z (6 years ago)
- Children:
- f92b315
- Parents:
- be07995
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2016-01-27 00:01:13)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-17 13:57:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/sysman.c
rbe07995 r8d74fdd 65 65 typedef struct { 66 66 job_t *job; 67 int flags; 67 68 callback_handler_t callback; 68 69 void *callback_arg; … … 205 206 * If unit already has the same job assigned callback is moved to it. 206 207 * 207 * @param[in] callback (optional) callback must explicitly delete reference 208 * to job, void callback(void *job, void *callback_arg) 209 * 210 * return EBUSY unit already has a job assigned of different type 211 */ 212 int sysman_run_job(unit_t *unit, unit_state_t target_state, 208 * @param[in] flags additional flags for job 209 * @param[in] callback (optional) callback must explicitly delete reference 210 * to job, void callback(void *job, void *callback_arg) 211 * @param[in] callback_arg 212 * 213 * @return EOK on successfully queued job 214 */ 215 int sysman_run_job(unit_t *unit, unit_state_t target_state, int flags, 213 216 callback_handler_t callback, void *callback_arg) 214 217 { … … 226 229 /* Pass reference to job_args */ 227 230 job_args->job = job; 231 job_args->flags = flags; 228 232 job_args->callback = callback; 229 233 job_args->callback_arg = callback_arg; … … 364 368 job_args_t *job_args = data; 365 369 job_t *job = job_args->job; 370 int flags = job_args->flags; 366 371 dyn_array_t job_closure; 367 372 dyn_array_initialize(&job_closure, job_t *); … … 373 378 free(job_args); 374 379 375 int rc = job_create_closure(job, &job_closure, 0);380 int rc = job_create_closure(job, &job_closure, flags); 376 381 if (rc != EOK) { 377 382 sysman_log(LVL_ERROR, "Cannot create closure for job %p (%i)",
Note:
See TracChangeset
for help on using the changeset viewer.