libthreads: perform 'model checking' when moving to next thread
authorBrian Norris <banorris@uci.edu>
Tue, 10 Apr 2012 22:25:34 +0000 (15:25 -0700)
committerBrian Norris <banorris@uci.edu>
Tue, 10 Apr 2012 22:50:15 +0000 (15:50 -0700)
Simply use the hollow 'check_current_action()' interface to perform model
checking in the thread_system_next() call.

Right now, this just adds the previous (a.k.a. 'current') action to our log.

libthreads.cc

index 07ce633e5d29277881ef213563dc5e4c3b8350a9..a8ce0faee1ef59a94191858d0e3f57baea41e43b 100644 (file)
@@ -72,6 +72,7 @@ static int thread_system_next(void)
        struct thread *curr, *next;
 
        curr = thread_current();
+       model->check_current_action();
        if (curr) {
                if (curr->state == THREAD_READY)
                        model->scheduler->add_thread(curr);