X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=threads.cc;h=6b4e2c740ab50b7b55f624b7bda05a4c9ad72678;hb=fc32611957cecd106751b62bc4de4aeddc9af56c;hp=7f515159f78052727180b1be6d82ba1df7e9ebac;hpb=b8b39c87557325a384faa45d0cae56a6f71f52b1;p=model-checker.git diff --git a/threads.cc b/threads.cc index 7f51515..6b4e2c7 100644 --- a/threads.cc +++ b/threads.cc @@ -4,9 +4,9 @@ #include -#include "libthreads.h" +#include #include "common.h" -#include "threads.h" +#include "threads-model.h" /* global "model" object */ #include "model.h" @@ -34,8 +34,6 @@ Thread * thread_current(void) * Provides a startup wrapper for each thread, allowing some initial * model-checking data to be recorded. This method also gets around makecontext * not being 64-bit clean - * @todo We should make the START event always immediately follow the - * CREATE event, so we don't get redundant traces... */ void thread_startup() { @@ -161,7 +159,7 @@ Thread::Thread(thrd_t *t, void (*func)(void *), void *a) : /* Initialize state */ ret = create_context(); if (ret) - printf("Error in create_context\n"); + model_print("Error in create_context\n"); id = model->get_next_id(); *user_thread = id; @@ -176,7 +174,7 @@ Thread::~Thread() } /** @return The thread_id_t corresponding to this Thread object. */ -thread_id_t Thread::get_id() +thread_id_t Thread::get_id() const { return id; }