Changes in tests/concurrency/cofor.cfa [0d41b2e1:26dfce5]
- File:
-
- 1 edited
-
tests/concurrency/cofor.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/cofor.cfa
r0d41b2e1 r26dfce5 1 1 #include <cofor.hfa> 2 2 3 3 4 void add_num( long * total, long val ) { __atomic_fetch_add( total, (long)val, __ATOMIC_SEQ_CST ); } … … 7 8 processor p[4]; 8 9 long total = 0; 9 cofor( i; 10 ) { 10 __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); 11 } 10 COFOR( i, 0, 10, __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); ); 12 11 { 13 12 corun; // does nothing
Note:
See TracChangeset
for help on using the changeset viewer.