2021-04-20 16:12:44 +00:00
|
|
|
#ifndef __JOBS_H
|
|
|
|
#define __JOBS_H
|
|
|
|
|
|
|
|
typedef struct cell cell;
|
2021-04-21 12:15:14 +00:00
|
|
|
struct cell
|
|
|
|
{
|
2021-04-20 16:12:44 +00:00
|
|
|
int id;
|
2021-04-20 16:50:27 +00:00
|
|
|
int pid;
|
2021-04-21 12:15:14 +00:00
|
|
|
char *cmd;
|
|
|
|
cell *next;
|
2021-04-21 13:12:19 +00:00
|
|
|
int state;
|
2021-04-20 16:12:44 +00:00
|
|
|
};
|
|
|
|
|
2021-04-21 12:15:14 +00:00
|
|
|
typedef cell *list;
|
2021-04-20 16:12:44 +00:00
|
|
|
|
2021-04-21 13:12:19 +00:00
|
|
|
void ajouter(cell **list, int pid, int id, char **cmd, int state);
|
2021-04-21 12:15:14 +00:00
|
|
|
void supprimer(cell **list, int pid);
|
|
|
|
void afficher(cell **list);
|
|
|
|
void initialiser(list *list);
|
|
|
|
void liberer(list *list);
|
|
|
|
cell *trouver(list *l_ptr, int pid);
|
2021-04-20 16:12:44 +00:00
|
|
|
|
2021-04-21 11:50:58 +00:00
|
|
|
#endif
|