Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SMPI_is_inited() and smpi_enabled() have the same purpose. Keep only the former.
[simgrid.git] / src / include / xbt / coverage.h
1 /* Copyright (c) 2019-2022. The SimGrid Team. All rights reserved.               */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef COVERAGE_H
7 #define COVERAGE_H
8
9 #include <xbt/base.h>
10
11 SG_BEGIN_DECL
12
13 #ifdef COVERAGE
14
15 #if defined(__GNUC__) && __GNUC__ >= 11
16 #include "gcov.h"
17 #define coverage_checkpoint()                                                                                          \
18   do {                                                                                                                 \
19     __gcov_dump();                                                                                                     \
20     __gcov_reset();                                                                                                    \
21   } while (0)
22 #else
23 extern void __gcov_flush();
24 #define coverage_checkpoint() __gcov_flush()
25 #endif
26
27 #else
28 #define coverage_checkpoint() (void)0
29 #endif
30
31 SG_END_DECL
32
33 #endif