projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
21f8ca7
)
model: add const
author
Brian Norris
<banorris@uci.edu>
Tue, 20 Nov 2012 04:51:04 +0000
(20:51 -0800)
committer
Brian Norris
<banorris@uci.edu>
Tue, 20 Nov 2012 04:51:04 +0000
(20:51 -0800)
model.cc
patch
|
blob
|
history
model.h
patch
|
blob
|
history
diff --git
a/model.cc
b/model.cc
index 700f25c017b1d44aa310eee2f4518c7e051abf1c..8d8c18780fe756d3b0770806b36bf952f169b187 100644
(file)
--- a/
model.cc
+++ b/
model.cc
@@
-172,7
+172,7
@@
unsigned int ModelChecker::get_num_threads() const
}
/** @return The currently executing Thread. */
}
/** @return The currently executing Thread. */
-Thread * ModelChecker::get_current_thread()
+Thread * ModelChecker::get_current_thread()
const
{
return scheduler->get_current_thread();
}
{
return scheduler->get_current_thread();
}
@@
-183,7
+183,8
@@
modelclock_t ModelChecker::get_next_seq_num()
return ++priv->used_sequence_numbers;
}
return ++priv->used_sequence_numbers;
}
-Node * ModelChecker::get_curr_node() {
+Node * ModelChecker::get_curr_node() const
+{
return node_stack->get_head();
}
return node_stack->get_head();
}
@@
-2016,7
+2017,7
@@
ModelAction * ModelChecker::get_last_unlock(ModelAction *curr) const
return NULL;
}
return NULL;
}
-ModelAction * ModelChecker::get_parent_action(thread_id_t tid)
+ModelAction * ModelChecker::get_parent_action(thread_id_t tid)
const
{
ModelAction *parent = get_last_action(tid);
if (!parent)
{
ModelAction *parent = get_last_action(tid);
if (!parent)
@@
-2029,7
+2030,7
@@
ModelAction * ModelChecker::get_parent_action(thread_id_t tid)
* @param tid The thread whose clock vector we want
* @return Desired clock vector
*/
* @param tid The thread whose clock vector we want
* @return Desired clock vector
*/
-ClockVector * ModelChecker::get_cv(thread_id_t tid)
+ClockVector * ModelChecker::get_cv(thread_id_t tid)
const
{
return get_parent_action(tid)->get_cv();
}
{
return get_parent_action(tid)->get_cv();
}
diff --git
a/model.h
b/model.h
index 74866c65b6824138c09eef3400d49d6527000d27..80917741c0048ad1d05ca952d2459484f1523fce 100644
(file)
--- a/
model.h
+++ b/
model.h
@@
-111,11
+111,11
@@
public:
thread_id_t get_next_id();
unsigned int get_num_threads() const;
thread_id_t get_next_id();
unsigned int get_num_threads() const;
- Thread * get_current_thread();
+ Thread * get_current_thread()
const
;
int switch_to_master(ModelAction *act);
int switch_to_master(ModelAction *act);
- ClockVector * get_cv(thread_id_t tid);
- ModelAction * get_parent_action(thread_id_t tid);
+ ClockVector * get_cv(thread_id_t tid)
const
;
+ ModelAction * get_parent_action(thread_id_t tid)
const
;
void check_promises_thread_disabled();
void mo_check_promises(thread_id_t tid, const ModelAction *write);
void check_promises(thread_id_t tid, ClockVector *old_cv, ClockVector * merge_cv);
void check_promises_thread_disabled();
void mo_check_promises(thread_id_t tid, const ModelAction *write);
void check_promises(thread_id_t tid, ClockVector *old_cv, ClockVector * merge_cv);
@@
-128,7
+128,7
@@
public:
void set_bad_synchronization();
const model_params params;
void set_bad_synchronization();
const model_params params;
- Node * get_curr_node();
+ Node * get_curr_node()
const
;
MEMALLOC
private:
MEMALLOC
private: