aboutsummaryrefslogtreecommitdiffstats
path: root/native/include
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2012-05-16 13:10:50 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2012-05-17 09:29:05 -0400
commit7cd7212e7273c9c137e4bb1825d2b9f3842c882d (patch)
treee73b650eaed2868b12cb9c7c2150456e989d7a01 /native/include
parent5cb503377c18b1c099c5b1a5375ece53fe25258e (diff)
C++: move shared RW locking defs into own file
Part of refactoring sharedres.cpp.
Diffstat (limited to 'native/include')
-rw-r--r--native/include/blocking.h31
-rw-r--r--native/include/rw-blocking.h35
2 files changed, 35 insertions, 31 deletions
diff --git a/native/include/blocking.h b/native/include/blocking.h
index 0734d9d..b70f1a6 100644
--- a/native/include/blocking.h
+++ b/native/include/blocking.h
@@ -82,37 +82,6 @@ Interference bound_blocking_all_clusters(
82 unsigned long interval, 82 unsigned long interval,
83 const TaskInfo* exclude_tsk); 83 const TaskInfo* exclude_tsk);
84 84
85void split_by_type(const ContentionSet& requests,
86 ContentionSet& reads,
87 ContentionSet& writes);
88void split_by_type(const Resources& resources,
89 Resources &reads,
90 Resources &writes);
91void split_by_type(const ClusterResources& per_cluster,
92 ClusterResources &reads);
93void split_by_type(const ClusterResources& per_cluster,
94 ClusterResources &reads,
95 ClusterResources &writes);
96
97struct RWCount {
98 unsigned int res_id;
99 unsigned int num_reads;
100 unsigned int num_writes;
101 unsigned int rlength;
102 unsigned int wlength;
103
104 RWCount(unsigned int id) : res_id(id),
105 num_reads(0),
106 num_writes(0),
107 rlength(0),
108 wlength(0)
109 {}
110};
111
112typedef std::vector<RWCount> RWCounts;
113
114void merge_rw_requests(const TaskInfo &tsk, RWCounts &counts);
115
116extern const unsigned int UNLIMITED; 85extern const unsigned int UNLIMITED;
117 86
118#endif 87#endif
diff --git a/native/include/rw-blocking.h b/native/include/rw-blocking.h
new file mode 100644
index 0000000..d4463f7
--- /dev/null
+++ b/native/include/rw-blocking.h
@@ -0,0 +1,35 @@
1#ifndef RW_BLOCKING_H
2#define RW_BLOCKING_H
3
4void split_by_type(const ContentionSet& requests,
5 ContentionSet& reads,
6 ContentionSet& writes);
7void split_by_type(const Resources& resources,
8 Resources &reads,
9 Resources &writes);
10void split_by_type(const ClusterResources& per_cluster,
11 ClusterResources &reads);
12void split_by_type(const ClusterResources& per_cluster,
13 ClusterResources &reads,
14 ClusterResources &writes);
15
16struct RWCount {
17 unsigned int res_id;
18 unsigned int num_reads;
19 unsigned int num_writes;
20 unsigned int rlength;
21 unsigned int wlength;
22
23 RWCount(unsigned int id) : res_id(id),
24 num_reads(0),
25 num_writes(0),
26 rlength(0),
27 wlength(0)
28 {}
29};
30
31typedef std::vector<RWCount> RWCounts;
32
33void merge_rw_requests(const TaskInfo &tsk, RWCounts &counts);
34
35#endif RW_BLOCKING_H