From 82f404f66eb2f25ac3125fac4d45ba62673ebf36 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 28 Jul 2024 18:28:35 +0530 Subject: jobs: scheduled -> requested --- include/jobs.h | 2 +- src/jobs.c | 2 +- src/queue.c | 6 +++--- src/solver_highs.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/jobs.h b/include/jobs.h index 2610c7b..e6ad25d 100644 --- a/include/jobs.h +++ b/include/jobs.h @@ -12,7 +12,7 @@ struct output { struct job { char *name, *drv_path, *nix_attr_name; - bool scheduled; + bool requested; bool insubstituters; size_t outputs_size, outputs_filled; struct output **outputs; diff --git a/src/jobs.c b/src/jobs.c index 83a18c8..845df08 100644 --- a/src/jobs.c +++ b/src/jobs.c @@ -442,7 +442,7 @@ static int job_new(struct job **j, char *name, char *drv_path, char *attr, print_err("%s", strerror(errno)); return -errno; } - job->scheduled = false; + job->requested = false; job->id = -1; job->outputs_size = 0; diff --git a/src/queue.c b/src/queue.c index c3ae7ee..bbfbb0f 100644 --- a/src/queue.c +++ b/src/queue.c @@ -43,7 +43,7 @@ static int queue_dag_isolate(struct job *job, struct job *keep_parent, job->parents_filled = 0; } - if (job->scheduled) + if (job->requested) CIRCLEQ_REMOVE(jobs, job, clist); HASH_DEL(*htab, job); @@ -186,8 +186,8 @@ static int queue_push(struct queue *queue, struct job *job) } /* no duplicate entries in queue */ - if (!job->scheduled) { - job->scheduled = true; + if (!job->requested) { + job->requested = true; CIRCLEQ_INSERT_TAIL(&queue->jobs, job, clist); } pthread_mutex_unlock(&queue->mutex); diff --git a/src/solver_highs.c b/src/solver_highs.c index 214fb8d..0e8b0cb 100644 --- a/src/solver_highs.c +++ b/src/solver_highs.c @@ -33,7 +33,7 @@ static int solver_highs_unwrapped(double *solution, struct job_clist *q, return -errno; } for (size_t i = 0; i < jobid->filled; i++) { - if (jobid->jobs[i]->scheduled) + if (jobid->jobs[i]->requested) col_profit[i] = 1.0; } -- cgit v1.2.3