Project
Loading...
Searching...
No Matches
process_group.h
Go to the documentation of this file.
1
22#ifndef __PROCESS_GROUP_H
23
24#define __PROCESS_GROUP_H
25
26#include "process_iterator.h"
27
28#include "list.h"
29
30#define PIDHASH_SZ 1024
31#define pid_hashfn(x) ((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1))
32
34{
35 //hashtable with all the processes (array of struct list of struct process)
37 struct list *proclist;
40 struct timeval last_update;
41};
42
43int init_process_group(struct process_group *pgroup, int target_pid, int include_children);
44
46
48
50
51int find_process_by_name(const char *process_name);
52
53int remove_process(struct process_group *pgroup, int pid);
54
55#endif
uint16_t pid
Definition RawData.h:2
int init_process_group(struct process_group *pgroup, int target_pid, int include_children)
void update_process_group(struct process_group *pgroup)
int find_process_by_pid(pid_t pid)
int close_process_group(struct process_group *pgroup)
#define PIDHASH_SZ
int find_process_by_name(const char *process_name)
int remove_process(struct process_group *pgroup, int pid)
Definition list.h:40
struct list * proctable[PIDHASH_SZ]
struct timeval last_update
struct list * proclist