X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5ec2b80b686983f84ebab7c7398a29e73286deee..372f92e67e3eb3ca800b6d9bcf214594cf3b6798:/include/xbt/base.h diff --git a/include/xbt/base.h b/include/xbt/base.h index 155dfbff30..ceb0fb2be1 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -1,4 +1,4 @@ -/* xbt.h - Public interface to the xbt (simgrid's toolbox) */ +/* xbt.h - Public interface to the xbt (SimGrid's toolbox) */ /* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */ @@ -42,14 +42,12 @@ #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg))) #endif -#define XBT_ATTRIB_DEPRECATED_v334(mesg) \ - XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.33)") -#define XBT_ATTRIB_DEPRECATED_v335(mesg) \ - XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.34)") -#define XBT_ATTRIB_DEPRECATED_v336(mesg) \ - XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.35)") -#define XBT_ATTRIB_DEPRECATED_v337(mesg) \ - XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.36)") +#define XBT_ATTRIB_DEPRECATED_v338(mesg) \ + XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.37)") +#define XBT_ATTRIB_DEPRECATED_v339(mesg) \ + XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.38)") +#define XBT_ATTRIB_DEPRECATED_v340(mesg) \ + XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.39)") /* Work around https://github.com/microsoft/vscode-cpptools/issues/4503 */ #ifdef __INTELLISENSE__ @@ -64,12 +62,12 @@ # 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 +#define XBT_ATTRIB_NOINLINE __attribute__((noinline)) + +#if defined(__GNUC__) +#define XBT_ALWAYS_INLINE inline __attribute__((always_inline)) +#else +#define XBT_ALWAYS_INLINE inline #endif /* Stringify argument. */ @@ -137,20 +135,18 @@ #define _XBT_STRINGIFY_A_22_(a, ...) #a, _XBT_IF_ONE_ARG(_XBT_STRINGIFY, _XBT_STRINGIFY_A_23_, __VA_ARGS__)(__VA_ARGS__) #define _XBT_STRINGIFY_A_23_(a, ...) #a, _XBT_IF_ONE_ARG(_XBT_STRINGIFY, _XBT_STRINGIFY_A_24_, __VA_ARGS__)(__VA_ARGS__) #define _XBT_STRINGIFY_A_24_(a, ...) #a, _XBT_IF_ONE_ARG(_XBT_STRINGIFY, _XBT_STRINGIFY_A_25_, __VA_ARGS__)(__VA_ARGS__) -#define _XBT_STRINGIFY_A_25_(...) error_maximum_size_of_XBT_STRINGIFY_ARGS_reached - -/* Handle import/export stuff - * - * Rationale of XBT_PUBLIC: +#define _XBT_STRINGIFY_A_25_(a, ...) #a, _XBT_IF_ONE_ARG(_XBT_STRINGIFY, _XBT_STRINGIFY_A_26_, __VA_ARGS__)(__VA_ARGS__) +#define _XBT_STRINGIFY_A_26_(a, ...) #a, _XBT_IF_ONE_ARG(_XBT_STRINGIFY, _XBT_STRINGIFY_A_27_, __VA_ARGS__)(__VA_ARGS__) +#define _XBT_STRINGIFY_A_27_(a, ...) #a, _XBT_IF_ONE_ARG(_XBT_STRINGIFY, _XBT_STRINGIFY_A_28_, __VA_ARGS__)(__VA_ARGS__) +#define _XBT_STRINGIFY_A_28_(a, ...) #a, _XBT_IF_ONE_ARG(_XBT_STRINGIFY, _XBT_STRINGIFY_A_29_, __VA_ARGS__)(__VA_ARGS__) +#define _XBT_STRINGIFY_A_29_(a, ...) #a, _XBT_IF_ONE_ARG(_XBT_STRINGIFY, _XBT_STRINGIFY_A_30_, __VA_ARGS__)(__VA_ARGS__) +#define _XBT_STRINGIFY_A_30_(...) error_maximum_size_of_XBT_STRINGIFY_ARGS_reached + +/* Rationale of XBT_PUBLIC: * * This is for library symbols visible from the application-land. * Basically, any symbols defined in the include/directory must be like this (plus some other globals). * - * UNIX coders should just think of it as a special way to say "extern". - * - * * If you build the DLL, define the DLL_EXPORT symbol so that all symbols actually get exported by this file. - * - * * If you link your application against the DLL or if you do a UNIX build, don't do anything special. This file - * will do the right thing for you by default. + * Just think of it as a special way to say "extern". */ #if defined(__ELF__)