Changeset aba20d2 for doc/papers/concurrency/examples
- Timestamp:
- Jun 17, 2019, 1:09:41 PM (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:
- 800bae1, 9d5089e
- Parents:
- 8b34df0 (diff), b4d34fa (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:
- doc/papers/concurrency/examples
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/concurrency/examples/PingPong.c
r8b34df0 raba20d2 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
r8b34df0 raba20d2 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.