void* thr1(void* arg) { pthread_mutex_lock(&m2); switch(state) { case 0: EBStack_init(); state = 1; //fall-through case 1: pthread_mutex_unlock(&m2); push_loop(); break; } return 0; }
void* thr1(void* arg) { __VERIFIER_atomic_acquire(&m2); switch(state) { case 0: EBStack_init(); state = 1; //fall-through case 1: __VERIFIER_atomic_release(&m2); push_loop(); break; } return 0; }