summaryrefslogtreecommitdiff
path: root/include/jobs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/jobs.h')
-rw-r--r--include/jobs.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/jobs.h b/include/jobs.h
index 7390306..54152cf 100644
--- a/include/jobs.h
+++ b/include/jobs.h
@@ -9,20 +9,23 @@ struct output {
};
struct job {
- char *name, *drv_path, *attr;
+ char *name, *drv_path, *nix_attr_name;
bool scheduled;
bool insubstituters;
-
size_t outputs_size, outputs_filled;
struct output **outputs;
+ /* DAG */
size_t deps_size, deps_filled;
struct job **deps;
-
size_t parents_size, parents_filled;
struct job **parents;
+ /* queue */
CIRCLEQ_ENTRY(job) clist;
+
+ /* solver */
+ ssize_t id;
};
CIRCLEQ_HEAD(job_clist, job);
@@ -37,7 +40,7 @@ typedef enum {
int job_read(FILE *stream, struct job **jobs);
/* Spawns nix-eval-jobs and connects its stdout to stream */
-int jobs_init(FILE **stream, const char *expr);
+int jobs_init(FILE **stream, char *expr);
void job_free(struct job *j);
int job_parents_list_insert(struct job *job, struct job *parent);
void job_deps_list_rm(struct job *job, struct job *dep);