X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=libthreads.cc;h=07ce633e5d29277881ef213563dc5e4c3b8350a9;hb=7fe82d0f56f7b2791a06a29986902da142207a90;hp=fb828b18aa079e2d726d0cfc851600d7ec6d53d0;hpb=f646d6a9d7c201e54a3f7eb1f026064d4136cf2e;p=model-checker.git diff --git a/libthreads.cc b/libthreads.cc index fb828b1..07ce633 100644 --- a/libthreads.cc +++ b/libthreads.cc @@ -137,12 +137,13 @@ int thread_create(struct thread *t, void (*start_routine)(), void *arg) return 0; } -void thread_join(struct thread *t) +int thread_join(struct thread *t) { int ret = 0; while (t->state != THREAD_COMPLETED && !ret) /* seq_cst is just a 'don't care' parameter */ ret = thread_switch_to_master(new ModelAction(THREAD_JOIN, memory_order_seq_cst, NULL, VALUE_NONE)); + return ret; } int thread_yield(void)