-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparallel.h
More file actions
35 lines (25 loc) · 721 Bytes
/
parallel.h
File metadata and controls
35 lines (25 loc) · 721 Bytes
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
27
28
29
30
31
32
33
34
35
#ifndef PARALLEL_H
#define PARALLEL_H
#include "stack.h"
#include "command.h"
#include <stdlib.h>
typedef struct stack* graphnode_list_t;
typedef struct stack* string_list_t;
struct graphnode {
command_t cmd;
graphnode_list_t dependencies;
string_list_t readList;
string_list_t writeList;
int aid;
};
struct graph {
graphnode_list_t independent;
graphnode_list_t dependent;
};
typedef struct graph* graph_t;
typedef struct graphnode* graphnode_t;
void build_io_lists(command_t, string_list_t, string_list_t);
void add_to_graph(/*graph_t graph, */graphnode_list_t, command_t, string_list_t, string_list_t);
void execute_node(graphnode_t node);
void execute_parallel(command_stream_t commandStream);
#endif