diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-06-30 12:59:44 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-06-30 14:08:17 +0530 |
commit | 96647a48d9ddf12e239d99af514a743721c06f84 (patch) | |
tree | 4705b5d215fcb12389843c7da5c32233a368ccad /include | |
parent | bf2d66357b9135442f9dec277678b0597abc1d15 (diff) |
solver_util/jobid: build cost and isdirect
Diffstat (limited to 'include')
-rw-r--r-- | include/queue.h | 2 | ||||
-rw-r--r-- | include/solver_util.h | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/include/queue.h b/include/queue.h index fee5bb3..dd7e4db 100644 --- a/include/queue.h +++ b/include/queue.h @@ -17,7 +17,7 @@ typedef enum { struct queue { struct job_clist jobs; struct htab *htab; - struct job_ids *job_ids; + struct jobid *jobid; sem_t sem; queue_state_t state; pthread_mutex_t mutex; diff --git a/include/solver_util.h b/include/solver_util.h index 99d5fcd..5c5f5d2 100644 --- a/include/solver_util.h +++ b/include/solver_util.h @@ -1,11 +1,20 @@ +#include <stdint.h> + #include "jobs.h" #ifndef SOLVER_UTIL_H -struct job_ids { +struct jobid { struct job **jobs; - ssize_t filled, size; + size_t filled, size; + uint32_t *cost; + /* user directly asked for this to be build, not a transitively acquired + * dependency */ + bool *isdirect; }; +void jobid_free(struct jobid *jid); +int jobid_init(struct job_clist *q, struct jobid **job_ids); + #define SOLVER_UTIL_H #endif |