It's defined as an alias for __gcov_flush() when coverage is enabled, or a
no-op otherwise.
--- /dev/null
+/* Copyright (c) 2019. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef COVERAGE_H
+#define COVERAGE_H
+
+#include <xbt/base.h>
+
+SG_BEGIN_DECL()
+
+#ifdef COVERAGE
+extern void __gcov_flush();
+#define coverage_checkpoint() __gcov_flush()
+#else
+#define coverage_checkpoint() (void)0
+#endif
+
+SG_END_DECL()
+
+#endif
#include "src/internal_config.h"
#include "src/xbt_modinter.h" /* prototype of other module's init/exit in XBT */
#include "xbt/config.hpp"
#include "src/internal_config.h"
#include "src/xbt_modinter.h" /* prototype of other module's init/exit in XBT */
#include "xbt/config.hpp"
+#include "xbt/coverage.h"
#include "xbt/dynar.h"
#include "xbt/log.h"
#include "xbt/log.hpp"
#include "xbt/dynar.h"
#include "xbt/log.h"
#include "xbt/log.hpp"
-#ifdef COVERAGE
-extern "C" void __gcov_flush(); // used in xbt_abort()
-#endif
-
/** @brief Kill the program in silence */
void xbt_abort()
{
/** @brief Kill the program in silence */
void xbt_abort()
{
/* Call __gcov_flush on abort when compiling with coverage options. */
/* Call __gcov_flush on abort when compiling with coverage options. */
- __gcov_flush();
-#endif
#ifdef _WIN32
/* We said *in silence*. We don't want to see the error message printed by Microsoft's implementation of abort(). */
raise(SIGABRT);
#ifdef _WIN32
/* We said *in silence*. We don't want to see the error message printed by Microsoft's implementation of abort(). */
raise(SIGABRT);
src/include/mc/mc.h
src/include/simgrid/sg_config.hpp
src/include/surf/surf.hpp
src/include/mc/mc.h
src/include/simgrid/sg_config.hpp
src/include/surf/surf.hpp
+ src/include/xbt/coverage.h
src/include/xbt/parmap.hpp
src/include/xbt/mmalloc.h
src/include/catch.hpp
src/include/xbt/parmap.hpp
src/include/xbt/mmalloc.h
src/include/catch.hpp