-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.c
26 lines (20 loc) · 823 Bytes
/
config.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "config.h"
void create_forking_scheme(forking_info_t *forking_scheme) {
forking_scheme[0].process_number = 0;
forking_scheme[0].children_count = 1;
forking_scheme[0].children = malloc(sizeof(int));
forking_scheme[0].children[0] = 1;
forking_scheme[1].process_number = 1;
forking_scheme[1].children_count = 4;
forking_scheme[1].children = malloc(sizeof(int) * 4);
forking_scheme[1].children[0] = 2;
forking_scheme[1].children[1] = 3;
forking_scheme[1].children[2] = 4;
forking_scheme[1].children[3] = 5;
forking_scheme[2].process_number = 5;
forking_scheme[2].children_count = 3;
forking_scheme[2].children = malloc(sizeof(int) * 3);
forking_scheme[2].children[0] = 6;
forking_scheme[2].children[1] = 7;
forking_scheme[2].children[2] = 8;
}