model: totally destroy 'curr' within initialize_curr_action()
[model-checker.git] / model.h
diff --git a/model.h b/model.h
index c99e0f8b424ddbe8079593713e498e53fe6fb80e..8ff9d375838b193bec751f9b7f0d419a89f07a8d 100644 (file)
--- a/model.h
+++ b/model.h
@@ -36,6 +36,7 @@ struct model_params {
        int maxfuturedelay;
        unsigned int fairwindow;
        unsigned int enabledcount;
        int maxfuturedelay;
        unsigned int fairwindow;
        unsigned int enabledcount;
+       unsigned int bound;
 };
 
 struct PendingFutureValue {
 };
 
 struct PendingFutureValue {
@@ -111,6 +112,7 @@ public:
 
        const model_params params;
        Scheduler * get_scheduler() { return scheduler;}
 
        const model_params params;
        Scheduler * get_scheduler() { return scheduler;}
+       Node * get_curr_node();
 
        MEMALLOC
 private:
 
        MEMALLOC
 private:
@@ -137,7 +139,7 @@ private:
         */
        void set_current_action(ModelAction *act) { priv->current_action = act; }
        Thread * check_current_action(ModelAction *curr);
         */
        void set_current_action(ModelAction *act) { priv->current_action = act; }
        Thread * check_current_action(ModelAction *curr);
-       ModelAction * initialize_curr_action(ModelAction *curr);
+       bool initialize_curr_action(ModelAction **curr);
        bool process_read(ModelAction *curr, bool second_part_of_rmw);
        bool process_write(ModelAction *curr);
        bool process_mutex(ModelAction *curr);
        bool process_read(ModelAction *curr, bool second_part_of_rmw);
        bool process_write(ModelAction *curr);
        bool process_mutex(ModelAction *curr);
@@ -169,7 +171,6 @@ private:
        bool w_modification_order(ModelAction *curr);
        bool release_seq_heads(const ModelAction *rf, rel_heads_list_t *release_heads, struct release_seq *pending) const;
        bool resolve_release_sequences(void *location, work_queue_t *work_queue);
        bool w_modification_order(ModelAction *curr);
        bool release_seq_heads(const ModelAction *rf, rel_heads_list_t *release_heads, struct release_seq *pending) const;
        bool resolve_release_sequences(void *location, work_queue_t *work_queue);
-       void do_complete_join(ModelAction *join);
 
        ModelAction *diverge;
        ModelAction *earliest_diverge;
 
        ModelAction *diverge;
        ModelAction *earliest_diverge;
@@ -186,6 +187,10 @@ private:
         * to a trace of all actions performed on the object. */
        HashTable<const void *, action_list_t, uintptr_t, 4> *lock_waiters_map;
 
         * to a trace of all actions performed on the object. */
        HashTable<const void *, action_list_t, uintptr_t, 4> *lock_waiters_map;
 
+       /** Per-object list of actions. Maps an object (i.e., memory location)
+        * to a trace of all actions performed on the object. */
+       HashTable<const void *, action_list_t, uintptr_t, 4> *condvar_waiters_map;
+
        HashTable<void *, std::vector<action_list_t>, uintptr_t, 4 > *obj_thrd_map;
        std::vector< Promise *, SnapshotAlloc<Promise *> > *promises;
        std::vector< struct PendingFutureValue, SnapshotAlloc<struct PendingFutureValue> > *futurevalues;
        HashTable<void *, std::vector<action_list_t>, uintptr_t, 4 > *obj_thrd_map;
        std::vector< Promise *, SnapshotAlloc<Promise *> > *promises;
        std::vector< struct PendingFutureValue, SnapshotAlloc<struct PendingFutureValue> > *futurevalues;