From: Brian Norris Date: Fri, 27 Apr 2012 06:36:26 +0000 (-0700) Subject: thread: remove dead Thread code X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a6f86729fc2e64ae7286d74094cb2f9d7745c17a;p=cdsspec-compiler.git thread: remove dead Thread code --- diff --git a/threads.cc b/threads.cc index dc7202e..d799144 100644 --- a/threads.cc +++ b/threads.cc @@ -33,10 +33,6 @@ int Thread::create_context() if (ret) return ret; - /* start_routine == NULL means this is our initial context */ - if (!start_routine) - return 0; - /* Initialize new managed context */ stack = stack_allocate(STACK_SIZE); context.uc_stack.ss_sp = stack; @@ -93,20 +89,6 @@ Thread::Thread(thrd_t *t, void (*func)(), void *a) { *user_thread = id; } -Thread::Thread(thrd_t *t) { - /* system thread */ - user_thread = t; - start_routine = NULL; - arg = NULL; - - create_context(); - stack = NULL; - state = THREAD_CREATED; - id = model->get_next_id(); - *user_thread = id; - model->set_system_context(&context); -} - Thread::~Thread() { complete(); diff --git a/threads.h b/threads.h index 490081a..69bd115 100644 --- a/threads.h +++ b/threads.h @@ -19,7 +19,6 @@ public: void * operator new(size_t size); void operator delete(void *ptr); Thread(thrd_t *t, void (*func)(), void *a); - Thread(thrd_t *t); ~Thread(); void complete();