Index: doc/papers/concurrency/examples/PingPong.c
===================================================================
--- doc/papers/concurrency/examples/PingPong.c	(revision d7a02ae903476ded9a21da3034888ccf8617a83d)
+++ doc/papers/concurrency/examples/PingPong.c	(revision e068c8a8da15b590c9ee6dc1bf9fefcffcc2b1dc)
@@ -2,33 +2,16 @@
 
 typedef struct PingPong {
+	int restart;										// style 1
+	int N, i;
 	const char * name;
-	int N, i;
 	struct PingPong * partner;
-	void * next;
+	void * next;										// style 2
 } PingPong;
-#define PPCtor( name, N ) { name, N, 0, NULL, NULL }
+#define PPCtor( name, N ) { 0, N, 0, name, NULL, NULL }
+
 void comain( PingPong * pp ) __attribute__(( noinline ));
 void comain( PingPong * pp ) {
+#if 0
 	if ( __builtin_expect(pp->next != 0, 1) ) goto *pp->next;
-#if 0
-	pp->next = &&here;
-		asm( "mov  %0,%%rdi" : "=m" (pp) );
-		asm( "mov  %rdi,%rax" );
-#ifndef OPT
-#ifdef PRINT
-		asm( "add  $16, %rsp" );
-#endif // PRINT
-		asm( "popq %rbp" );
-#endif // ! OPT
-
-#ifdef OPT
-#ifdef PRINT
-		asm( "popq %rbx" );
-#endif // PRINT
-#endif // OPT
-		asm( "jmp  comain" );
-  here: ;
-#endif // 0
-
 	pp->next = &&cycle;
 	for ( ; pp->i < pp->N; pp->i += 1 ) {
@@ -53,4 +36,32 @@
 	  cycle: ;
 	} // for
+#endif // 0
+
+#if 1
+	static void * states[] = {&&s0, &&s1};
+	goto *states[pp->restart];
+  s0: pp->restart = 1;
+	for ( ; pp->i < pp->N; pp->i += 1 ) {
+#ifdef PRINT
+		printf( "%s %d\n", pp->name, pp->i );
+#endif // PRINT
+		asm( "mov  %0,%%rdi" : "=m" (pp->partner) );
+		asm( "mov  %rdi,%rax" );
+#ifndef OPT
+#ifdef PRINT
+		asm( "add  $16, %rsp" );
+#endif // PRINT
+		asm( "popq %rbp" );
+#endif // ! OPT
+
+#ifdef OPT
+#ifdef PRINT
+		asm( "popq %rbx" );
+#endif // PRINT
+#endif // OPT
+		asm( "jmp  comain" );
+	  s1: ;
+	} // for
+#endif // 0
 }
 
@@ -70,4 +81,4 @@
 // Local Variables: //
 // tab-width: 4 //
-// compile-command: "gcc-8 -g -DPRINT PingPong.c" //
+// compile-command: "gcc-9 -g -DPRINT PingPong.c" //
 // End: //
