From a6f86729fc2e64ae7286d74094cb2f9d7745c17a Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 26 Apr 2012 23:36:26 -0700 Subject: [PATCH] thread: remove dead Thread code --- threads.cc | 18 ------------------ threads.h | 1 - 2 files changed, 19 deletions(-) diff --git a/threads.cc b/threads.cc index dc7202e3..d799144f 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 490081af..69bd115c 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(); -- 2.34.1