void* thr1(void* arg) { __VERIFIER_atomic_acquire(); switch(state) { case STATE_UNINITIALIZED: PseudoRandomUsingAtomic_constructor(1); state = STATE_INITIALIZED; __VERIFIER_atomic_release(); PseudoRandomUsingAtomic_monitor(); //never returns break; case STATE_INITIALIZED: __VERIFIER_atomic_release(); PseudoRandomUsingAtomic__threadmain(); break; } return 0; }
int main(){ PseudoRandomUsingAtomic_constructor(1); __CPROVER_ASYNC_00: PseudoRandomUsingAtomic_monitor(); while(1) { __CPROVER_ASYNC_01: PseudoRandomUsingAtomic__threadmain(); } }