Changeset d7a02ae for doc/papers/concurrency/examples
- Timestamp:
- Jun 13, 2019, 8:27:28 AM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- d60780c
- Parents:
- 6625727
- Location:
- doc/papers/concurrency/examples
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/concurrency/examples/PingPong.c
r6625727 rd7a02ae 3 3 typedef struct PingPong { 4 4 const char * name; 5 int N, i; 5 6 struct PingPong * partner; 6 int N, i;7 7 void * next; 8 8 } PingPong; 9 #define PPCtor( name, N ) { name, N ULL, N, 0, NULL }9 #define PPCtor( name, N ) { name, N, 0, NULL, NULL } 10 10 void comain( PingPong * pp ) __attribute__(( noinline )); 11 11 void comain( PingPong * pp ) { -
doc/papers/concurrency/examples/Pingpong.cfa
r6625727 rd7a02ae 8 8 }; 9 9 10 void ?{}( PingPong & this, const char * name, unsigned int N, PingPong & part ) {11 this.[name, N] = [name, N]; &this.part = ∂12 }13 void ?{}( PingPong & this, const char * name, unsigned int N ) {14 this{ name, N, *0p }; // call first constructor15 }10 // void ?{}( PingPong & this, const char * name, unsigned int N, PingPong & part ) { 11 // this.[name, N] = [name, N]; &this.part = ∂ 12 // } 13 // void ?{}( PingPong & this, const char * name, unsigned int N ) { 14 // this{ name, N, *0p }; // call first constructor 15 // } 16 16 void cycle( PingPong & pingpong ) { 17 17 resume( pingpong );
Note: See TracChangeset
for help on using the changeset viewer.