From 1069e1b27fc4ed06476da0a8793a55e68b8a6b86 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Wed, 11 Jul 2012 14:37:53 -0700 Subject: [PATCH] threads: use constructor initializer list --- threads.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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(); -- 2.34.1