Changeset a573c22 for doc/papers/concurrency/examples/Fib3.c
- Timestamp:
- Feb 6, 2020, 10:27:01 AM (3 years ago)
- Branches:
- arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 53a49cc
- Parents:
- b0795be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/concurrency/examples/Fib3.c
rb0795be ra573c22 2 2 3 3 typedef struct { 4 int fn1, fn; 5 void * next; 4 int restart, fn1, fn; 6 5 } Fib; 7 #define FibCtor { 1, 0, NULL}6 #define FibCtor { 0, 1, 0 } 8 7 9 8 Fib * comain( Fib * f ) { 10 if ( __builtin_expect(f->next != 0, 1) ) goto *f->next; 11 f->next = &&s1; 9 static void * states[] = {&&s0, &&s1}; 10 goto *states[f->restart]; 11 s0: f->restart = 1; 12 12 for ( ;; ) { 13 13 return f;
Note: See TracChangeset
for help on using the changeset viewer.