2021-04-20 16:12:44 +00:00
|
|
|
#ifndef __JOBS_H
|
|
|
|
#define __JOBS_H
|
|
|
|
|
|
|
|
typedef struct cell cell;
|
|
|
|
struct cell {
|
|
|
|
int id;
|
2021-04-20 16:50:27 +00:00
|
|
|
int pid;
|
|
|
|
int state;
|
|
|
|
char* cmd;
|
2021-04-20 16:12:44 +00:00
|
|
|
cell* next;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef cell* list;
|
|
|
|
|
|
|
|
void ajouter(cell** list, int pid, int id);
|
|
|
|
void supprimer(cell** list, int pid);
|
|
|
|
void afficher(cell** list);
|
|
|
|
void initialiser(list* list);
|
|
|
|
void liberer(list* list);
|
|
|
|
int contiens(list* l_ptr, int pid);
|
|
|
|
|
2021-04-20 16:50:27 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// state:
|
|
|
|
// 0: running
|
|
|
|
// 1: suspended
|