thread: remove dead Thread code
authorBrian Norris <banorris@uci.edu>
Fri, 27 Apr 2012 06:36:26 +0000 (23:36 -0700)
committerBrian Norris <banorris@uci.edu>
Fri, 27 Apr 2012 06:36:26 +0000 (23:36 -0700)
threads.cc
threads.h

index dc7202e3aaa08e4e9dc00d8d6a40e6c04834180e..d799144f67e1df86dcaacaa217da2f3f799b5cdd 100644 (file)
@@ -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();
index 490081afe882c41b0bfec641740f43c4e99d90ed..69bd115c4a88243657ce8f92088962f97249dccb 100644 (file)
--- 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();