action: rework/rename 'synchronized()' to 'synchronize_with()'
authorBrian Norris <banorris@uci.edu>
Fri, 10 Aug 2012 21:57:20 +0000 (14:57 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 16 Aug 2012 17:30:25 +0000 (10:30 -0700)
Fix some comments, names, etc.

Privatize synchronized()/synchronize_with(), since it's only intended for
within other wrapper actions performed on ModelAction.

action.cc
action.h

index a88cc451f532a59a2ff939bef3172613aedf3e57..131cb74d7e821ba8c473499f0eed3e7eaf504191 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -161,23 +161,23 @@ void ModelAction::create_cv(const ModelAction *parent)
                cv = new ClockVector(NULL, this);
 }
 
-
 /** Update the model action's read_from action */
 void ModelAction::read_from(const ModelAction *act)
 {
        ASSERT(cv);
        if (act!=NULL && act->is_release() && this->is_acquire()) {
-               synchronized(act);
+               synchronize_with(act);
                cv->merge(act->cv);
        }
        reads_from = act;
 }
 
-
-/** Synchronize the current thread with the thread corresponding to
- *  the ModelAction parameter. */
-
-void ModelAction::synchronized(const ModelAction *act) {
+/**
+ * Synchronize the current thread with the thread corresponding to the
+ * ModelAction parameter.
+ * @param act The ModelAction to synchronize with
+ */
+void ModelAction::synchronize_with(const ModelAction *act) {
        model->check_promises(cv, act->cv);
        cv->merge(act->cv);
 }
index 7c457076501f77f93550da6fe629e2e625a0f2cb..ffe60dc5e8e9a33e18a59123c77d6a6fa09f505b 100644 (file)
--- a/action.h
+++ b/action.h
@@ -81,8 +81,6 @@ public:
        void create_cv(const ModelAction *parent = NULL);
        ClockVector * get_cv() const { return cv; }
        void read_from(const ModelAction *act);
-       void synchronized(const ModelAction *act);
-
 
        bool happens_before(const ModelAction *act) const;
 
@@ -98,6 +96,7 @@ public:
 
        MEMALLOC
 private:
+       void synchronize_with(const ModelAction *act);
 
        /** Type of action (read, write, thread create, thread yield, thread join) */
        action_type type;