From 36be4b06236ef60234ac8d6fe3962208c880c163 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Thu, 20 Jun 2024 21:03:29 +0530 Subject: jobs: improve the DAG implementation maintain a record of parent nodes for efficient node removal --- include/jobs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/jobs.h b/include/jobs.h index d223ec2..85d606b 100644 --- a/include/jobs.h +++ b/include/jobs.h @@ -16,6 +16,9 @@ struct job { size_t deps_size, deps_filled; struct job **deps; + size_t parents_size, parents_filled; + struct job **parents; + CIRCLEQ_ENTRY(job) clist; }; CIRCLEQ_HEAD(job_clist, job); @@ -29,7 +32,6 @@ typedef enum { int job_read(FILE *stream, struct job **jobs); int jobs_init(FILE **stream); -int job_new(struct job **j, char *name, char *drv_path); void job_free(struct job *j); #define JOBS_H -- cgit v1.2.3