Changeset fc12f05 for tests/concurrency
- Timestamp:
- Nov 13, 2023, 3:43:43 AM (2 years ago)
- Branches:
- master
- Children:
- 25f2798
- Parents:
- 0030b508 (diff), 2174191 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- tests/concurrency
- Files:
-
- 7 edited
-
actors/.expect/dynamic.txt (modified) (1 diff)
-
actors/.expect/static.txt (modified) (1 diff)
-
actors/dynamic.cfa (modified) (1 diff)
-
actors/static.cfa (modified) (1 diff)
-
cofor.cfa (modified) (2 diffs)
-
waitfor/parse.cfa (modified) (2 diffs)
-
waituntil/channel_close.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/actors/.expect/dynamic.txt
r0030b508 rfc12f05 1 1 starting 2 2 started 3 stopping4 3 Done 5 4 stopped -
tests/concurrency/actors/.expect/static.txt
r0030b508 rfc12f05 1 1 starting 2 2 started 3 stopping4 3 Done 5 4 stopped -
tests/concurrency/actors/dynamic.cfa
r0030b508 rfc12f05 58 58 *d_actor | *d_msg; 59 59 60 sout | "stopping";61 62 60 stop_actor_system(); 63 61 -
tests/concurrency/actors/static.cfa
r0030b508 rfc12f05 55 55 actor | msg; 56 56 57 sout | "stopping";58 59 57 stop_actor_system(); 60 58 -
tests/concurrency/cofor.cfa
r0030b508 rfc12f05 1 1 #include <cofor.hfa> 2 3 2 4 3 void add_num( long * total, long val ) { __atomic_fetch_add( total, (long)val, __ATOMIC_SEQ_CST ); } … … 8 7 processor p[4]; 9 8 long total = 0; 10 COFOR( i, 0, 10, __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); ); 9 cofor( i; 10 ) { 10 __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); 11 } 11 12 { 12 13 corun; // does nothing -
tests/concurrency/waitfor/parse.cfa
r0030b508 rfc12f05 10 10 // Created On : Wed Aug 30 17:53:29 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Apr 10 22:52:18202313 // Update Count : 6 412 // Last Modified On : Wed Nov 1 07:28:19 2023 13 // Update Count : 65 14 14 // 15 15 … … 258 258 // Local Variables: // 259 259 // tab-width: 4 // 260 // compile-command: "cfa waitfor.cfa" //260 // compile-command: "cfa parse.cfa" // 261 261 // End: // -
tests/concurrency/waituntil/channel_close.cfa
r0030b508 rfc12f05 26 26 for( ;; ) { 27 27 if ( useAnd ) { 28 waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }29 and waituntil( (in2 << B) ) { assert( B_removes == in2 ); B_removes++; removes++; }28 waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; } 29 and waituntil( (in2 << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( B_removes == in2 ); B_removes++; removes++; } 30 30 continue; 31 31 } 32 waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }33 or waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }32 waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; } 33 or waituntil( (in << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); ( B_removes == in ); B_removes++; removes++; } 34 34 } 35 35 } catchResume ( channel_closed * e ) {} // continue to remove until would block … … 37 37 try { 38 38 for( ;; ) 39 waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }39 waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; } 40 40 } catchResume ( channel_closed * e ) {} // continue to remove until would block 41 41 catch ( channel_closed * e ) {} 42 42 try { 43 43 for( ;; ) 44 waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }44 waituntil( (in << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( B_removes == in ); B_removes++; removes++; } 45 45 } catchResume ( channel_closed * e ) {} // continue to remove until would block 46 46 catch ( channel_closed * e ) {}
Note:
See TracChangeset
for help on using the changeset viewer.