Fix snapshot code
[model-checker.git] / common.h
index 62c16f45250e55a693864fd17759b9673d0220d6..7be72d72f8e0b56fc8f333ffe25489685b053f60 100644 (file)
--- a/common.h
+++ b/common.h
@@ -9,8 +9,9 @@
 #include "config.h"
 
 extern int model_out;
+extern int switch_alloc;
 
-#define model_print(fmt, ...) do { dprintf(model_out, fmt, ##__VA_ARGS__); } while (0)
+#define model_print(fmt, ...) do { switch_alloc = 1; dprintf(model_out, fmt, ##__VA_ARGS__); switch_alloc = 0; } while (0)
 
 #ifdef CONFIG_DEBUG
 #define DEBUG(fmt, ...) do { model_print("*** %15s:%-4d %25s() *** " fmt, __FILE__, __LINE__, __func__, ##__VA_ARGS__); } while (0)