From: Brian Norris Date: Sat, 26 May 2012 03:28:30 +0000 (-0700) Subject: model: add get_num_threads() X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7ccfaf5b2ca3db6abb7312b0f4bb778be25cc17f;p=c11tester.git model: add get_num_threads() --- diff --git a/model.cc b/model.cc index 06fe72f8..24c46b68 100644 --- 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 57959b7c..9c69ec49 100644 --- 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);