projet-systeme-exploitation.../jobs.h

25 lines
402 B
C
Raw Normal View History

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-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 12:15:14 +00:00
void initialiser(list *list);
void liberer(list *list);
2021-04-24 15:32:54 +00:00
void afficher(cell **list);
int ajouter(cell **list, int pid, char **cmd);
void supprimer(cell **list, int pid);
2021-04-21 12:15:14 +00:00
cell *trouver(list *l_ptr, int pid);
2021-04-24 15:32:54 +00:00
cell *trouver_id(list *l_ptr, int id);
2021-04-20 16:12:44 +00:00
2021-04-21 11:50:58 +00:00
#endif