diff --git a/rumur/src/generate-model.cc b/rumur/src/generate-model.cc index 0be16ad5..7d3f2f9d 100644 --- a/rumur/src/generate-model.cc +++ b/rumur/src/generate-model.cc @@ -797,14 +797,14 @@ void generate_model(std::ostream &out, const Model &m) { << "\n" << " for (;;) {\n" << "\n" - << " if (THREADS > 1 && __atomic_load_n(&error_count,\n" - << " __ATOMIC_SEQ_CST) >= MAX_ERRORS) {\n" - << " /* Another thread found an error. */\n" + << " const struct state *s = queue_dequeue(&queue_id);\n" + << " if (s == NULL) {\n" << " break;\n" << " }\n" << "\n" - << " const struct state *s = queue_dequeue(&queue_id);\n" - << " if (s == NULL) {\n" + << " if (THREADS > 1 && __atomic_load_n(&error_count,\n" + << " __ATOMIC_SEQ_CST) >= MAX_ERRORS) {\n" + << " /* Another thread found an error. */\n" << " break;\n" << " }\n" << "\n"