Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove the need of pthread_mutex in mmalloc, to allow its use with sthread
[simgrid.git] / src / include / xbt / coverage.h
index 6201587..3a56214 100644 (file)
@@ -14,7 +14,11 @@ SG_BEGIN_DECL
 
 #if defined(__GNUC__) && __GNUC__ >= 11
 #include "gcov.h"
-#define coverage_checkpoint() __gcov_dump()
+#define coverage_checkpoint()                                                                                          \
+  do {                                                                                                                 \
+    __gcov_dump();                                                                                                     \
+    __gcov_reset();                                                                                                    \
+  } while (0)
 #else
 extern void __gcov_flush();
 #define coverage_checkpoint() __gcov_flush()