diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-06-20 21:03:29 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-06-20 21:07:23 +0530 |
commit | 36be4b06236ef60234ac8d6fe3962208c880c163 (patch) | |
tree | 0a8d54871899f80434ae7076fb57f770ee7fabe4 /include | |
parent | af3ee1af961d21f106cf6ccc9606c6043f13d977 (diff) |
jobs: improve the DAG implementation
maintain a record of parent nodes for efficient node removal
Diffstat (limited to 'include')
-rw-r--r-- | include/jobs.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 |