Update readme
[c11tester.git] / action.cc
index 65e1447f1a755cae8416df96aa330addff0f4711..d8ce567039bfc451c13916aefc6d15b4b5211e38 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -111,8 +111,7 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc,
        /* References to NULL atomic variables can end up here */
        ASSERT(loc);
        this->size = size;
-       Thread *t = thread_current();
-       this->tid = t->get_id();
+       this->tid = thread_current_id();
 }
 
 
@@ -146,8 +145,7 @@ ModelAction::ModelAction(action_type_t type, const char * position, memory_order
        /* References to NULL atomic variables can end up here */
        ASSERT(loc);
        this->size = size;
-       Thread *t = thread_current();
-       this->tid = t->get_id();
+       this->tid = thread_current_id();
 }
 
 
@@ -253,6 +251,10 @@ bool ModelAction::is_wait() const {
        return type == ATOMIC_WAIT || type == ATOMIC_TIMEDWAIT;
 }
 
+bool ModelAction::is_timedwait() const {
+       return type == ATOMIC_TIMEDWAIT;
+}
+
 bool ModelAction::is_notify() const {
        return type == ATOMIC_NOTIFY_ONE || type == ATOMIC_NOTIFY_ALL;
 }