/* Here we show replication of cooperate'ing processes */ #include @process hello(@share x,int i) { int j; fprintf(stderr,"Hi from %d\n",i); @get(x,j); j+=i; @write(x,j); } eMain() { int i; @share x; @init(x); i = -1; @write(x,i); @cooperate (i @for 6) hello(x,i); @get(x,i); fprintf(stderr,"Read %d\n",i); }