File tree 3 files changed +19
-18
lines changed
3 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -777,19 +777,3 @@ void goto_symex_statet::get_l1_name(exprt &expr) const
777
777
Forall_operands (it, expr)
778
778
get_l1_name (*it);
779
779
}
780
-
781
- void goto_symex_statet::switch_to_thread (unsigned t)
782
- {
783
- PRECONDITION (source.thread_nr < threads.size ());
784
- PRECONDITION (t < threads.size ());
785
-
786
- // save PC
787
- threads[source.thread_nr ].pc =source.pc ;
788
- threads[source.thread_nr ].atomic_section_id =atomic_section_id;
789
-
790
- // get new PC
791
- source.thread_nr =t;
792
- source.pc =threads[t].pc ;
793
-
794
- guard=threads[t].guard ;
795
- }
Original file line number Diff line number Diff line change @@ -283,7 +283,6 @@ class goto_symex_statet final
283
283
void populate_dirty_for_function (
284
284
const irep_idt &id, const goto_functiont &);
285
285
286
- void switch_to_thread (unsigned t);
287
286
bool record_events;
288
287
incremental_dirtyt dirty;
289
288
Original file line number Diff line number Diff line change @@ -154,6 +154,24 @@ void goto_symext::initialize_entry_point(
154
154
symex_transition (state, state.source .pc , false );
155
155
}
156
156
157
+ static void
158
+ switch_to_thread (goto_symex_statet &state, const unsigned int thread_nb)
159
+ {
160
+ PRECONDITION (state.source .thread_nr < state.threads .size ());
161
+ PRECONDITION (thread_nb < state.threads .size ());
162
+
163
+ // save PC
164
+ state.threads [state.source .thread_nr ].pc = state.source .pc ;
165
+ state.threads [state.source .thread_nr ].atomic_section_id =
166
+ state.atomic_section_id ;
167
+
168
+ // get new PC
169
+ state.source .thread_nr = thread_nb;
170
+ state.source .pc = state.threads [thread_nb].pc ;
171
+
172
+ state.guard = state.threads [thread_nb].guard ;
173
+ }
174
+
157
175
void goto_symext::symex_threaded_step (
158
176
statet &state, const get_goto_functiont &get_goto_function)
159
177
{
@@ -173,7 +191,7 @@ void goto_symext::symex_threaded_step(
173
191
#if 0
174
192
std::cout << "********* Now executing thread " << t << '\n';
175
193
#endif
176
- state. switch_to_thread (t);
194
+ switch_to_thread (state, t);
177
195
symex_transition (state, state.source .pc , false );
178
196
}
179
197
}
You can’t perform that action at this time.
0 commit comments