Changeset c84dd61 for tests/concurrency
- Timestamp:
- Jun 21, 2023, 2:38:55 AM (3 years ago)
- Branches:
- master, stuck-waitfor-destruct
- Children:
- 92355883
- Parents:
- 0b0a285 (diff), 2de175ce (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/actors
- Files:
-
- 2 added
- 9 edited
-
.expect/inherit.txt (modified) (1 diff)
-
.expect/inline.txt (added)
-
dynamic.cfa (modified) (2 diffs)
-
executor.cfa (modified) (2 diffs)
-
inherit.cfa (modified) (3 diffs)
-
inline.cfa (added)
-
matrix.cfa (modified) (1 diff)
-
pingpong.cfa (modified) (3 diffs)
-
poison.cfa (modified) (3 diffs)
-
static.cfa (modified) (2 diffs)
-
types.cfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/actors/.expect/inherit.txt
r0b0a285 rc84dd61 4 4 A 5 5 A 6 A 7 A 6 8 Finished -
tests/concurrency/actors/dynamic.cfa
r0b0a285 rc84dd61 28 28 derived_actor * d_actor = alloc(); 29 29 (*d_actor){}; 30 *d_actor <<*d_msg;30 *d_actor | *d_msg; 31 31 return Delete; 32 32 } … … 58 58 derived_actor * d_actor = alloc(); 59 59 (*d_actor){}; 60 *d_actor <<*d_msg;60 *d_actor | *d_msg; 61 61 62 62 printf("stopping\n"); -
tests/concurrency/actors/executor.cfa
r0b0a285 rc84dd61 28 28 if ( recs % Batch == 0 ) { 29 29 for ( i; Batch ) { 30 gstart[sends % Set] <<shared_msg;30 gstart[sends % Set] | shared_msg; 31 31 sends += 1; 32 32 } … … 94 94 95 95 for ( i; Actors ) { 96 actors[i] <<shared_msg;96 actors[i] | shared_msg; 97 97 } // for 98 98 -
tests/concurrency/actors/inherit.cfa
r0b0a285 rc84dd61 7 7 8 8 struct Server { inline actor; }; 9 9 10 struct Server2 { inline Server; int b; }; 11 void ^?{}( Server2 & this ) { mutex(sout) sout | 'A'; } 12 10 13 struct D_msg { int a; inline message; }; 11 struct D_msg2 { inline D_msg; };12 13 void ^?{}( Server2 & this ) { mutex(sout) sout | 'A'; }14 14 void ?{}( D_msg & this ) { set_allocation( this, Delete ); } 15 15 void ^?{}( D_msg & this ) { mutex(sout) sout | 'A'; } 16 17 struct D_msg2 { inline D_msg; }; 16 18 17 19 allocation handle() { … … 30 32 D_msg * dm = alloc(); 31 33 (*dm){}; 32 D_msg2 dm2; 34 D_msg2 * dm2 = alloc(); 35 (*dm2){}; 33 36 Server2 * s = alloc(); 34 37 (*s){}; 35 38 Server2 * s2 = alloc(); 36 39 (*s2){}; 37 *s <<*dm;38 *s2 <<dm2;40 *s | *dm; 41 *s2 | *dm2; 39 42 stop_actor_system(); 40 43 } … … 44 47 D_msg * dm = alloc(); 45 48 (*dm){}; 46 D_msg2 dm2; 47 s[0] << *dm; 48 s[1] << dm2; 49 D_msg2 * dm2 = alloc(); 50 (*dm2){}; 51 s[0] | *dm; 52 s[1] | *dm2; 49 53 stop_actor_system(); 50 54 } -
tests/concurrency/actors/matrix.cfa
r0b0a285 rc84dd61 105 105 106 106 for ( unsigned int r = 0; r < xr; r += 1 ) { 107 actors[r] <<messages[r];107 actors[r] | messages[r]; 108 108 } // for 109 109 -
tests/concurrency/actors/pingpong.cfa
r0b0a285 rc84dd61 25 25 allocation retval = Nodelete; 26 26 if ( msg.count == times ) retval = Finished; 27 *po <<msg;27 *po | msg; 28 28 return retval; 29 29 } … … 35 35 allocation retval = Nodelete; 36 36 if ( msg.count == times ) retval = Finished; 37 *pi <<msg;37 *pi | msg; 38 38 return retval; 39 39 } … … 53 53 pi = &pi_actor; 54 54 p_msg m; 55 pi_actor <<m;55 pi_actor | m; 56 56 stop_actor_system(); 57 57 -
tests/concurrency/actors/poison.cfa
r0b0a285 rc84dd61 18 18 Server s[10]; 19 19 for ( i; 10 ) { 20 s[i] <<finished_msg;20 s[i] | finished_msg; 21 21 } 22 22 stop_actor_system(); … … 29 29 Server * s = alloc(); 30 30 (*s){}; 31 (*s) <<delete_msg;31 (*s) | delete_msg; 32 32 } 33 33 stop_actor_system(); … … 39 39 Server s[10]; 40 40 for ( i; 10 ) 41 s[i] <<destroy_msg;41 s[i] | destroy_msg; 42 42 stop_actor_system(); 43 43 for ( i; 10 ) -
tests/concurrency/actors/static.cfa
r0b0a285 rc84dd61 25 25 } 26 26 msg.cnt++; 27 receiver <<msg;27 receiver | msg; 28 28 return Nodelete; 29 29 } … … 55 55 derived_actor actor; 56 56 57 actor <<msg;57 actor | msg; 58 58 59 59 printf("stopping\n"); -
tests/concurrency/actors/types.cfa
r0b0a285 rc84dd61 72 72 b.num = 1; 73 73 c.num = 2; 74 a << b <<c;74 a | b | c; 75 75 stop_actor_system(); 76 76 … … 80 80 d_msg d_ac2_msg; 81 81 d_ac2_msg.num = 3; 82 d_ac2_0 <<d_ac2_msg;83 d_ac2_1 <<d_ac2_msg;82 d_ac2_0 | d_ac2_msg; 83 d_ac2_1 | d_ac2_msg; 84 84 stop_actor_system(); 85 85 … … 93 93 d_msg d_ac23_msg; 94 94 d_ac23_msg.num = 4; 95 d_ac3_0 <<d_ac23_msg;96 d_ac2_2 <<d_ac23_msg;95 d_ac3_0 | d_ac23_msg; 96 d_ac2_2 | d_ac23_msg; 97 97 stop_actor_system(); 98 98 } // RAII to clean up executor … … 107 107 b1.num = -1; 108 108 c2.num = 5; 109 a3 << b1 <<c2;109 a3 | b1 | c2; 110 110 stop_actor_system(); 111 111 } // RAII to clean up executor … … 120 120 b1.num = -1; 121 121 c2.num = 5; 122 a4 << b1 <<c2;122 a4 | b1 | c2; 123 123 stop_actor_system(); 124 124 } // RAII to clean up executor
Note:
See TracChangeset
for help on using the changeset viewer.