Changes between Version 15 and Version 16 of OpenMPTransformation
- Timestamp:
- 04/20/14 18:36:28 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OpenMPTransformation
v15 v16 238 238 239 239 Basically, use a lock for each critical name, plus one for the "no name". All threads must obtain lock to enter the critical section, then release it. 240 I.e., if there are critical sections name a, b, and c, there should be global root-scope variables of boolean type named `_critical_noname`, `_critical_a`, etc. 241 242 {{{ 243 #pragma omp critical a 244 S 245 }}} 246 247 => 248 249 {{{ 250 ... 251 _Bool _critical_a = $false; 252 . 253 . 254 . 255 $when (!_critical_a) _critical_a=$true; 256 translate(S); 257 _critical_a=$false; 258 }}} 240 259 241 260 === Translating `atomic` === 242 261 243 This is just `$atomic`. 262 This is just `$atomic`. Or nothing, since assignment expressions are already atomic in CIVL-C. The question is, what to do with non-atomic updates. They should register as race conditions. 244 263 245 264 === Translating`ordered` ===
