// S : tags min threads c c11 $TAGS // S : expect --result valid // S : cc -o test.bc -std=c11 $CC_OPT $file // S : verify $V_OPT test.bc #include #include #include atomic_int shared = 0; pthread_mutex_t mutex; void *thread( void *x ) { ++shared; return NULL; } int main() { pthread_t tid; pthread_create( &tid, NULL, thread, NULL ); ++shared; pthread_join( tid, NULL ); assert( shared == 2 ); return 0; }