projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8bfe055
)
model: add get_num_threads()
author
Brian Norris
<banorris@uci.edu>
Sat, 26 May 2012 03:28:30 +0000
(20:28 -0700)
committer
Brian Norris
<banorris@uci.edu>
Sat, 26 May 2012 03:37:54 +0000
(20:37 -0700)
model.cc
patch
|
blob
|
history
model.h
patch
|
blob
|
history
diff --git
a/model.cc
b/model.cc
index 06fe72f87f7cd04c832a19dcc46c1f2bb0ebc7c1..24c46b689272d22a61a3c82561dc68bbfa39a383 100644
(file)
--- a/
model.cc
+++ b/
model.cc
@@
-60,6
+60,11
@@
thread_id_t ModelChecker::get_next_id()
return next_thread_id++;
}
+int ModelChecker::get_num_threads()
+{
+ return next_thread_id;
+}
+
int ModelChecker::get_next_seq_num()
{
return ++used_sequence_numbers;
diff --git
a/model.h
b/model.h
index 57959b7c1609c838a7164ae0104eacd50c2ff1b7..9c69ec4965ecf138c17422045a18c49b569f8796 100644
(file)
--- a/
model.h
+++ b/
model.h
@@
-37,6
+37,7
@@
public:
Thread * get_thread(thread_id_t tid) { return (*thread_map)[id_to_int(tid)]; }
thread_id_t get_next_id();
+ int get_num_threads();
int get_next_seq_num();
int switch_to_master(ModelAction *act);