2016-06-05 03:19:36 +02:00
|
|
|
#ifndef __PROCESS_H__
|
|
|
|
#define __PROCESS_H__
|
|
|
|
|
2016-12-19 18:16:38 +01:00
|
|
|
struct process {
|
|
|
|
unsigned int version;
|
|
|
|
unsigned int index;
|
|
|
|
int proc_fd;
|
|
|
|
};
|
2016-12-19 01:08:55 +01:00
|
|
|
|
2016-12-20 23:36:00 +01:00
|
|
|
struct array_proc {
|
|
|
|
struct process **tab_proc;
|
|
|
|
int size;
|
|
|
|
};
|
|
|
|
|
2016-12-23 01:33:52 +01:00
|
|
|
int add_proc (struct array_proc *, struct process *);
|
|
|
|
int del_proc (struct array_proc *aproc, struct process *p);
|
2016-12-20 23:36:00 +01:00
|
|
|
|
2016-12-22 21:48:35 +01:00
|
|
|
void array_proc_print (struct array_proc *);
|
|
|
|
void array_proc_free (struct array_proc *);
|
2016-12-19 01:08:55 +01:00
|
|
|
|
2016-06-05 03:19:36 +02:00
|
|
|
struct process * srv_process_copy (const struct process *p);
|
|
|
|
int srv_process_eq (const struct process *p1, const struct process *p2);
|
|
|
|
// create the service process structure
|
|
|
|
void srv_process_gen (struct process *p
|
2016-12-14 23:17:35 +01:00
|
|
|
, unsigned int index, unsigned int version);
|
2016-06-05 03:19:36 +02:00
|
|
|
|
2017-01-19 22:07:52 +01:00
|
|
|
void process_print (struct process *);
|
2016-12-19 01:08:55 +01:00
|
|
|
#endif
|