X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=libthreads.cc;fp=libthreads.cc;h=c54c9aa415e6289c43abcba24e4e3a8d32874755;hb=cb5fb31052d5e3dbb01f65d12988bafa1ce51cf7;hp=a414686dccb713116bad22a1e6126f590b72cc7b;hpb=b7907204c39d4f4d006c62e779f2c0bc20028dba;p=model-checker.git diff --git a/libthreads.cc b/libthreads.cc index a414686..c54c9aa 100644 --- a/libthreads.cc +++ b/libthreads.cc @@ -23,11 +23,10 @@ int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg) int thrd_join(thrd_t t) { - int ret = 0; Thread *th = model->get_thread(thrd_to_id(t)); - while (th->get_state() != THREAD_COMPLETED && !ret) - ret = model->switch_to_master(NULL); - return ret; + while (th->get_state() != THREAD_COMPLETED) + model->switch_to_master(NULL); + return 0; } int thrd_yield(void)