Changes between Version 15 and Version 16 of OpenMPTransformation


Ignore:
Timestamp:
04/20/14 18:36:28 (12 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenMPTransformation

    v15 v16  
    238238
    239239Basically, 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.
     240I.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
     244S
     245}}}
     246
     247=>
     248
     249{{{
     250...
     251_Bool _critical_a = $false;
     252.
     253.
     254.
     255$when (!_critical_a) _critical_a=$true;
     256translate(S);
     257_critical_a=$false;
     258}}}
    240259
    241260=== Translating `atomic` ===
    242261
    243 This is just `$atomic`.
     262This 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.
    244263
    245264===  Translating`ordered` ===