X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=libthreads.cc;h=7ed5491f675fe91d646a8bec1d056ae712ea2ab3;hb=e1430f3d41e01fca5b878fc5909cf1c871c12f0e;hp=fd6259ad64d62474e0f7b7565cc72685e56288ad;hpb=24ac8e855acce4248271ca4a13f0dad8e74a96a4;p=model-checker.git diff --git a/libthreads.cc b/libthreads.cc index fd6259a..7ed5491 100644 --- a/libthreads.cc +++ b/libthreads.cc @@ -23,14 +23,14 @@ int thrd_join(thrd_t t) Thread *th = model->get_thread(thrd_to_id(t)); while (th->get_state() != THREAD_COMPLETED && !ret) /* seq_cst is just a 'don't care' parameter */ - ret = thread_current()->switch_to_master(new ModelAction(THREAD_JOIN, memory_order_seq_cst, NULL, VALUE_NONE)); + ret = model->switch_to_master(new ModelAction(THREAD_JOIN, memory_order_seq_cst, NULL, VALUE_NONE)); return ret; } int thrd_yield(void) { /* seq_cst is just a 'don't care' parameter */ - return thread_current()->switch_to_master(new ModelAction(THREAD_YIELD, memory_order_seq_cst, NULL, VALUE_NONE)); + return model->switch_to_master(new ModelAction(THREAD_YIELD, memory_order_seq_cst, NULL, VALUE_NONE)); } thrd_t thrd_current(void)