main, model: don't 'initialize' system_context
[model-checker.git] / model.cc
index a4f7e90fc332b39c8be422a8eef450f3d4368aca..44c7e353d79b5f8cd87de1f50763c1b705b6224e 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -749,7 +749,7 @@ int ModelChecker::switch_to_master(ModelAction *act)
        Thread * old = thread_current();
        set_current_action(act);
        old->set_state(THREAD_READY);
        Thread * old = thread_current();
        set_current_action(act);
        old->set_state(THREAD_READY);
-       return Thread::swap(old, get_system_context());
+       return Thread::swap(old, &system_context);
 }
 
 /**
 }
 
 /**
@@ -785,7 +785,7 @@ bool ModelChecker::take_step() {
        if (!next)
                return false;
        /* Return false only if swap fails with an error */
        if (!next)
                return false;
        /* Return false only if swap fails with an error */
-       return (Thread::swap(get_system_context(), next) == 0);
+       return (Thread::swap(&system_context, next) == 0);
 }
 
 /** Runs the current execution until threre are no more steps to take. */
 }
 
 /** Runs the current execution until threre are no more steps to take. */