Changeset c0c388d2 in mainline for uspace/srv/sysman/job.h


Ignore:
Timestamp:
2019-08-03T07:36:48Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
4fe7fcb
Parents:
694253c
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-03-16 19:31:17)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-03 07:36:48)
Message:

Sysman jobs memory management (refcnt)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/job.h

    r694253c rc0c388d2  
    33
    44#include <adt/list.h>
     5#include <atomic.h>
    56
    67#include "unit.h"
     
    2526
    2627struct job {
     28        /** Link to queue job is in */
    2729        link_t link;
    2830
     31        /** List of jobs (job_link_t ) that are blocking the job. */
    2932        list_t blocking_jobs;
     33
     34        /** Reference counter for the job structure. */
     35        atomic_t refcnt;
    3036
    3137        job_type_t type;
     
    3642        fibril_condvar_t state_cv;
    3743
     44        /** Return value of the job, defined only when state == JOB_FINISHED */
    3845        int retval;
    3946};
     
    4451extern int job_wait(job_t *);
    4552
     53extern void job_add_ref(job_t *);
     54extern void job_del_ref(job_t **);
     55
    4656extern job_t *job_create(job_type_t type);
    47 extern void job_destroy(job_t **);
    4857
    4958#endif
Note: See TracChangeset for help on using the changeset viewer.