- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/concurrency/examples/Fib3.c
r466fa01 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.