Changeset 8d74fdd in mainline for uspace/srv/sysman/sysman.c


Ignore:
Timestamp:
2019-08-17T13:57:05Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
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)
Message:

sysman: Shutdown operation as shutdown.tgt isolation

Since not all dependencies are captured by graph, sysman and taskman are
ignored when stopping servers, so that they can complete the shutdown
transition.

Conflicts:

boot/Makefile.common

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/sysman.c

    rbe07995 r8d74fdd  
    6565typedef struct {
    6666        job_t *job;
     67        int flags;
    6768        callback_handler_t callback;
    6869        void *callback_arg;
     
    205206 * If unit already has the same job assigned callback is moved to it.
    206207 *
    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 */
     215int sysman_run_job(unit_t *unit, unit_state_t target_state, int flags,
    213216    callback_handler_t callback, void *callback_arg)
    214217{
     
    226229        /* Pass reference to job_args */
    227230        job_args->job = job;
     231        job_args->flags = flags;
    228232        job_args->callback = callback;
    229233        job_args->callback_arg = callback_arg;
     
    364368        job_args_t *job_args = data;
    365369        job_t *job = job_args->job;
     370        int flags = job_args->flags;
    366371        dyn_array_t job_closure;
    367372        dyn_array_initialize(&job_closure, job_t *);
     
    373378        free(job_args);
    374379
    375         int rc = job_create_closure(job, &job_closure, 0);
     380        int rc = job_create_closure(job, &job_closure, flags);
    376381        if (rc != EOK) {
    377382                sysman_log(LVL_ERROR, "Cannot create closure for job %p (%i)",
Note: See TracChangeset for help on using the changeset viewer.