- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.hfa (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.hfa
r5cb51502 r431cd4f 69 69 struct cluster * cltr; 70 70 71 // Id within the cluster 72 unsigned cltr_id; 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; 73 79 74 80 // Set to true to notify the processor should terminate … … 140 146 // Cluster Tools 141 147 142 // Intrusives lanes which are used by the re laxed ready queue148 // Intrusives lanes which are used by the ready queue 143 149 struct __attribute__((aligned(128))) __intrusive_lane_t; 144 150 void ?{}(__intrusive_lane_t & this); 145 151 void ^?{}(__intrusive_lane_t & this); 146 152 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 ); 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); 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 used162 // Aligned to 128 for cache locality163 __snzi_t snzi;164 165 161 // Data tracking the actual lanes 166 162 // On a seperate cacheline from the used struct since … … 171 167 __intrusive_lane_t * volatile data; 172 168 169 // Array of times 170 __timestamp_t * volatile tscs; 171 173 172 // Number of lanes (empty or not) 174 173 volatile size_t count; … … 180 179 181 180 // Idle Sleep 182 struct __cluster_ idles{181 struct __cluster_proc_list { 183 182 // Spin lock protecting the queue 184 183 volatile uint64_t lock; … … 191 190 192 191 // List of idle processors 193 dlist(processor, processor) list; 192 dlist(processor, processor) idles; 193 194 // List of active processors 195 dlist(processor, processor) actives; 194 196 }; 195 197 … … 207 209 208 210 // List of idle processors 209 __cluster_ idles idles;211 __cluster_proc_list procs; 210 212 211 213 // List of threads
Note:
See TracChangeset
for help on using the changeset viewer.