diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index 8991420..fddb5b0 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -1314,7 +1314,9 @@ static int __cdecl cnd_bcast_thread(void *arg) p__Mtx_lock(&cm->mtx); while(!cm->go) { + trace("enter wait\n"); r = p__Cnd_wait(&cm->cnd, &cm->mtx); + trace("done waiting\n"); ok(!r, "failed to wait\n"); } p__Mtx_unlock(&cm->mtx); @@ -1367,8 +1369,15 @@ static void test_cnd(void) for(i = 0; i < NUM_THREADS; i++) p__Thrd_create(&threads[i], cnd_bcast_thread, (void*)&cm); - if (0) /* causes crash in later _Cnd_* calls on Windows */ - p__Cnd_destroy(&cm.cnd); + p__Mtx_lock(&mtx); + cm.go = 1; + p__Mtx_unlock(&mtx); + Sleep(1000); + p__Cnd_destroy(&cm.cnd); + + for(i = 0; i < NUM_THREADS; i++) + p__Thrd_join(threads[i], NULL); + return; p__Mtx_lock(&mtx); cm.go = 1;