From 6cd0e2979ee0b9870b4c3c9d4bfe072329a2c8e7 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 6 Feb 2023 14:22:07 +0100 Subject: [PATCH] Avoid duplicate declaration. --- include/xbt/base.h | 10 ++++------ src/mc/mc_mmu.hpp | 10 +--------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/include/xbt/base.h b/include/xbt/base.h index 6f4c6b67bb..5b55cb755f 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -64,12 +64,10 @@ # define XBT_ATTRIB_DESTRUCTOR(prio) __attribute__((__destructor__)) #endif -#ifndef XBT_ALWAYS_INLINE /* defined also in libsosp */ -# if defined(__GNUC__) -# define XBT_ALWAYS_INLINE inline __attribute__ ((always_inline)) -# else -# define XBT_ALWAYS_INLINE inline -# endif +#if defined(__GNUC__) +#define XBT_ALWAYS_INLINE inline __attribute__((always_inline)) +#else +#define XBT_ALWAYS_INLINE inline #endif /* Stringify argument. */ diff --git a/src/mc/mc_mmu.hpp b/src/mc/mc_mmu.hpp index 83f57e8843..bbeedf1e7d 100644 --- a/src/mc/mc_mmu.hpp +++ b/src/mc/mc_mmu.hpp @@ -6,18 +6,10 @@ #ifndef SIMGRID_MC_MMU_HPP #define SIMGRID_MC_MMU_HPP +#include "xbt/misc.h" #include #include -#ifndef XBT_ALWAYS_INLINE -#define XBT_ALWAYS_INLINE inline __attribute__((always_inline)) -#endif - -/** Size of a memory page for the current system. */ -extern "C" int xbt_pagesize; -/** Number of bits of addresses inside a given page, log2(xbt_pagesize). */ -extern "C" int xbt_pagebits; - namespace simgrid::mc::mmu { // TODO, do not depend on xbt_pagesize/xbt_pagebits but our own chunk size -- 2.20.1