From: Brian Norris Date: Wed, 11 Jul 2012 21:37:53 +0000 (-0700) Subject: threads: use constructor initializer list X-Git-Tag: pldi2013~363^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1069e1b27fc4ed06476da0a8793a55e68b8a6b86;p=model-checker.git threads: use constructor initializer list --- diff --git a/threads.cc b/threads.cc index b6eaee4..ba7b547 100644 --- a/threads.cc +++ b/threads.cc @@ -70,20 +70,19 @@ void Thread::complete() } Thread::Thread(thrd_t *t, void (*func)(void *), void *a) : + start_routine(func), + arg(a), + user_thread(t), + state(THREAD_CREATED), last_action_val(VALUE_NONE) { int ret; - user_thread = t; - start_routine = func; - arg = a; - /* Initialize state */ ret = create_context(); if (ret) printf("Error in create_context\n"); - state = THREAD_CREATED; id = model->get_next_id(); *user_thread = id; parent = thread_current();