- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.hfa (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.hfa
r431cd4f r5cb51502 69 69 struct cluster * cltr; 70 70 71 // Ready Queue state per processor 72 struct { 73 unsigned short its; 74 unsigned short itr; 75 unsigned id; 76 unsigned target; 77 unsigned long long int cutoff; 78 } rdq; 71 // Id within the cluster 72 unsigned cltr_id; 79 73 80 74 // Set to true to notify the processor should terminate … … 146 140 // Cluster Tools 147 141 148 // Intrusives lanes which are used by the re ady queue142 // Intrusives lanes which are used by the relaxed ready queue 149 143 struct __attribute__((aligned(128))) __intrusive_lane_t; 150 144 void ?{}(__intrusive_lane_t & this); 151 145 void ^?{}(__intrusive_lane_t & this); 152 146 153 // Aligned timestamps which are used by the relaxed ready queue 154 struct __attribute__((aligned(128))) __timestamp_t; 155 void ?{}(__timestamp_t & this); 156 void ^?{}(__timestamp_t & this); 147 // Counter used for wether or not the lanes are all empty 148 struct __attribute__((aligned(128))) __snzi_node_t; 149 struct __snzi_t { 150 unsigned mask; 151 int root; 152 __snzi_node_t * nodes; 153 }; 154 155 void ?{}( __snzi_t & this, unsigned depth ); 156 void ^?{}( __snzi_t & this ); 157 157 158 158 //TODO adjust cache size to ARCHITECTURE 159 159 // Structure holding the relaxed ready queue 160 160 struct __ready_queue_t { 161 // Data tracking how many/which lanes are used 162 // Aligned to 128 for cache locality 163 __snzi_t snzi; 164 161 165 // Data tracking the actual lanes 162 166 // On a seperate cacheline from the used struct since … … 167 171 __intrusive_lane_t * volatile data; 168 172 169 // Array of times170 __timestamp_t * volatile tscs;171 172 173 // Number of lanes (empty or not) 173 174 volatile size_t count; … … 179 180 180 181 // Idle Sleep 181 struct __cluster_ proc_list{182 struct __cluster_idles { 182 183 // Spin lock protecting the queue 183 184 volatile uint64_t lock; … … 190 191 191 192 // List of idle processors 192 dlist(processor, processor) idles; 193 194 // List of active processors 195 dlist(processor, processor) actives; 193 dlist(processor, processor) list; 196 194 }; 197 195 … … 209 207 210 208 // List of idle processors 211 __cluster_ proc_list procs;209 __cluster_idles idles; 212 210 213 211 // List of threads
Note:
See TracChangeset
for help on using the changeset viewer.