X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=threads.cc;h=a9395926816f38bc4872019a3047357574c1e2b9;hb=889c191994ae00a058bb71e24de95842f6454c0d;hp=b3a1d5599fb541d340184e0e2ba0f7589c0ec5ae;hpb=f472540b6ab3b65c91221f6f0790d8327333a5c2;p=model-checker.git diff --git a/threads.cc b/threads.cc index b3a1d55..a939592 100644 --- a/threads.cc +++ b/threads.cc @@ -104,7 +104,7 @@ int Thread::swap(ucontext_t *ctxt, Thread *t) /** Terminate a thread and free its stack. */ void Thread::complete() { - if (state != THREAD_COMPLETED) { + if (!is_complete()) { DEBUG("completed thread %d\n", get_id()); state = THREAD_COMPLETED; if (stack)