25 lines
340 B
C
25 lines
340 B
C
|
#ifndef __LIST_H
|
||
|
#define __LIST_H
|
||
|
|
||
|
typedef struct job
|
||
|
{
|
||
|
int pid;
|
||
|
char *cmd;
|
||
|
int used;
|
||
|
} job;
|
||
|
|
||
|
typedef struct list {
|
||
|
job *jobs;
|
||
|
int size;
|
||
|
int limit;
|
||
|
} list;
|
||
|
|
||
|
|
||
|
void init(list *list);
|
||
|
void free(list *list);
|
||
|
void print(list *list);
|
||
|
|
||
|
job add(list *list, int pid, char **cmd, int state);
|
||
|
job remove(list *list, int pid);
|
||
|
|
||
|
#endif
|