aboutsummaryrefslogblamecommitdiff
path: root/include/jobs.h
blob: be95c571b8a9d7d3e82e4134da44890958eea3aa (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                 
                             
            
                              


                                    
                                                   
                              
                                 




                                                        
                                              
#include <stdio.h>
#include <sys/queue.h>

LIST_HEAD(output_dlist, output);
struct output {
	char *name, *store_path;
	LIST_ENTRY(output) dlist;
};

LIST_HEAD(job_dlist, job);
CIRCLEQ_HEAD(job_clist, job);
struct job {
	char *name, *drv_path;
	struct output_dlist outputs;
	struct job_dlist deps;

	/* TODO: replace dlist with clist jobs.c */
	LIST_ENTRY(job) dlist;
	CIRCLEQ_ENTRY(job) clist;
};

int jobs_init(FILE **stream);
int job_new(struct job **j, char *name, char *drv_path);
void job_free(struct job *j);
int job_read(FILE *stream, struct job **jobs);