libthreads: thread_join: return 'int' as status
[model-checker.git] / libthreads.cc
index fb828b18aa079e2d726d0cfc851600d7ec6d53d0..07ce633e5d29277881ef213563dc5e4c3b8350a9 100644 (file)
@@ -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)