#include<civlc.cvh>

int y = 0;

void f(){
  int v = 0;

  $choose{
    $when($true);
    $when(y==1) v = 1;
  }
  $assert((v == 0));
}

void g(){
  y = 1;
}

void main(){
  $proc procs[2];
  
  $atomic{
    procs[0] = $spawn f();
    procs[1] = $spawn g();
  }
  $waitall(procs, 2);
}

