previous synchronization was weird...
authorBrian Demsky <bdemsky@uci.edu>
Sat, 3 Nov 2012 03:26:19 +0000 (20:26 -0700)
committerBrian Demsky <bdemsky@uci.edu>
Sat, 3 Nov 2012 03:26:19 +0000 (20:26 -0700)
action.cc
clockvector.cc
clockvector.h

index 140d59098f8c37732753e4f80ddc58f8a883810b..1387ed15b67c9ac25d7fcba68491bbb72d8ff236 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -365,7 +365,7 @@ bool ModelAction::synchronize_with(const ModelAction *act) {
 
 bool ModelAction::has_synchronized_with(const ModelAction *act) const
 {
 
 bool ModelAction::has_synchronized_with(const ModelAction *act) const
 {
-       return cv->has_synchronized_with(act->cv);
+       return cv->synchronized_since(act);
 }
 
 /**
 }
 
 /**
index 7d947c63873cc41abc2b0cfb2cff85868ba6765d..e56c2ace662507be12875c18446932fe54593252 100644 (file)
@@ -75,17 +75,6 @@ bool ClockVector::synchronized_since(const ModelAction *act) const
        return false;
 }
 
        return false;
 }
 
-bool ClockVector::has_synchronized_with(const ClockVector *cv) const
-{
-       ASSERT(cv);
-       if (cv->num_threads > num_threads)
-               return false;
-       for (int i = 0; i < cv->num_threads; i++)
-               if (cv->clock[i] > clock[i])
-                       return false;
-       return true;
-}
-
 /** Gets the clock corresponding to a given thread id from the clock vector. */
 modelclock_t ClockVector::getClock(thread_id_t thread) {
        int threadid = id_to_int(thread);
 /** Gets the clock corresponding to a given thread id from the clock vector. */
 modelclock_t ClockVector::getClock(thread_id_t thread) {
        int threadid = id_to_int(thread);
index 6a902c5215342bae0313d56b3e6cfa8267bd79cf..9000a5d72eddd90ba1ba5964e4a12105a75ca9b1 100644 (file)
@@ -17,7 +17,6 @@ public:
        ~ClockVector();
        void merge(const ClockVector *cv);
        bool synchronized_since(const ModelAction *act) const;
        ~ClockVector();
        void merge(const ClockVector *cv);
        bool synchronized_since(const ModelAction *act) const;
-       bool has_synchronized_with(const ClockVector *cv) const;
 
        void print() const;
        modelclock_t getClock(thread_id_t thread);
 
        void print() const;
        modelclock_t getClock(thread_id_t thread);