/* ******************************** Host ************************************ */
-extern int MSG_HOST_LEVEL;
+XBT_PUBLIC_DATA(int) MSG_HOST_LEVEL;
/** @brief Host datatype.
@ingroup m_host_management
/* Hack: let msg load directly the right factory */
typedef void (*smx_ctx_factory_initializer_t)(smx_context_factory_t*);
-XBT_PUBLIC(smx_ctx_factory_initializer_t) smx_factory_initializer_to_use;
+XBT_PUBLIC_DATA(smx_ctx_factory_initializer_t) smx_factory_initializer_to_use;
extern char* smx_context_factory_name;
extern int smx_context_stack_size;
extern int smx_context_stack_size_was_set;
SG_BEGIN_DECL()
-XBT_PUBLIC(xbt_lib_t) host_lib;
-XBT_PUBLIC(int) ROUTING_HOST_LEVEL; //Routing level
-XBT_PUBLIC(int) SURF_CPU_LEVEL; //Surf cpu level
-XBT_PUBLIC(int) SURF_WKS_LEVEL; //Surf workstation level
-XBT_PUBLIC(int) SIMIX_HOST_LEVEL; //Simix host level
-XBT_PUBLIC(int) SIMIX_STORAGE_LEVEL; //Simix storage level
-XBT_PUBLIC(int) MSG_HOST_LEVEL; //Msg level
-XBT_PUBLIC(int) SD_HOST_LEVEL; //Simdag host level
-XBT_PUBLIC(int) SD_STORAGE_LEVEL; //Simdag storage level
-XBT_PUBLIC(int) COORD_HOST_LEVEL; //Coordinates level
-XBT_PUBLIC(int) NS3_HOST_LEVEL; //host node for ns3
-
-XBT_PUBLIC(xbt_lib_t) link_lib;
-XBT_PUBLIC(int) SD_LINK_LEVEL; //Simdag level
-XBT_PUBLIC(int) SURF_LINK_LEVEL; //Surf level
-XBT_PUBLIC(int) NS3_LINK_LEVEL; //link for ns3
-
-XBT_PUBLIC(xbt_lib_t) as_router_lib;
-XBT_PUBLIC(int) ROUTING_ASR_LEVEL; //Routing level
-XBT_PUBLIC(int) COORD_ASR_LEVEL; //Coordinates level
-XBT_PUBLIC(int) NS3_ASR_LEVEL; //host node for ns3
-XBT_PUBLIC(int) ROUTING_PROP_ASR_LEVEL; //Properties for AS and router
-
-XBT_PUBLIC(xbt_lib_t) storage_lib;
-XBT_PUBLIC(int) ROUTING_STORAGE_LEVEL; //Routing storage level
-XBT_PUBLIC(int) ROUTING_STORAGE_HOST_LEVEL;
-XBT_PUBLIC(int) SURF_STORAGE_LEVEL; // Surf storage level
-XBT_PUBLIC(xbt_lib_t) file_lib;
-XBT_PUBLIC(xbt_lib_t) storage_type_lib;
-XBT_PUBLIC(int) ROUTING_STORAGE_TYPE_LEVEL; //Routing storage_type level
+XBT_PUBLIC_DATA(xbt_lib_t) host_lib;
+XBT_PUBLIC_DATA(int) ROUTING_HOST_LEVEL; //Routing level
+XBT_PUBLIC_DATA(int) SURF_CPU_LEVEL; //Surf cpu level
+XBT_PUBLIC_DATA(int) SURF_WKS_LEVEL; //Surf workstation level
+XBT_PUBLIC_DATA(int) SIMIX_HOST_LEVEL; //Simix host level
+XBT_PUBLIC_DATA(int) SIMIX_STORAGE_LEVEL; //Simix storage level
+XBT_PUBLIC_DATA(int) MSG_HOST_LEVEL; //Msg level
+XBT_PUBLIC_DATA(int) SD_HOST_LEVEL; //Simdag host level
+XBT_PUBLIC_DATA(int) SD_STORAGE_LEVEL; //Simdag storage level
+XBT_PUBLIC_DATA(int) COORD_HOST_LEVEL; //Coordinates level
+XBT_PUBLIC_DATA(int) NS3_HOST_LEVEL; //host node for ns3
+
+XBT_PUBLIC_DATA(xbt_lib_t) link_lib;
+XBT_PUBLIC_DATA(int) SD_LINK_LEVEL; //Simdag level
+XBT_PUBLIC_DATA(int) SURF_LINK_LEVEL; //Surf level
+XBT_PUBLIC_DATA(int) NS3_LINK_LEVEL; //link for ns3
+
+XBT_PUBLIC_DATA(xbt_lib_t) as_router_lib;
+XBT_PUBLIC_DATA(int) ROUTING_ASR_LEVEL; //Routing level
+XBT_PUBLIC_DATA(int) COORD_ASR_LEVEL; //Coordinates level
+XBT_PUBLIC_DATA(int) NS3_ASR_LEVEL; //host node for ns3
+XBT_PUBLIC_DATA(int) ROUTING_PROP_ASR_LEVEL; //Properties for AS and router
+
+XBT_PUBLIC_DATA(xbt_lib_t) storage_lib;
+XBT_PUBLIC_DATA(int) ROUTING_STORAGE_LEVEL; //Routing storage level
+XBT_PUBLIC_DATA(int) ROUTING_STORAGE_HOST_LEVEL;
+XBT_PUBLIC_DATA(int) SURF_STORAGE_LEVEL; // Surf storage level
+XBT_PUBLIC_DATA(xbt_lib_t) file_lib;
+XBT_PUBLIC_DATA(xbt_lib_t) storage_type_lib;
+XBT_PUBLIC_DATA(int) ROUTING_STORAGE_TYPE_LEVEL; //Routing storage_type level
/* The callbacks to register for the routing to work */
void routing_AS_begin(sg_platf_AS_cbarg_t AS);
/* Build the DLL */
#if defined(DLL_EXPORT)
-# define XBT_PUBLIC(type) extern __declspec(dllexport) type
+# define XBT_PUBLIC(type) __declspec(dllexport) type
# define XBT_EXPORT_NO_IMPORT(type) __declspec(dllexport) type
# define XBT_IMPORT_NO_EXPORT(type) type
# define XBT_PUBLIC_DATA(type) extern __declspec(dllexport) type
/* Pack everything up statically */
#elif defined(DLL_STATIC)
-# define XBT_PUBLIC(type) extern type
+# define XBT_PUBLIC(type) type
# define XBT_EXPORT_NO_IMPORT(type) type
# define XBT_IMPORT_NO_EXPORT(type) type
# define XBT_PUBLIC_DATA(type) extern type
/* Link against the DLL */
#elif (defined(_XBT_WIN32) && !defined(DLL_EXPORT) && !defined(DLL_STATIC))
-# define XBT_PUBLIC(type) extern __declspec(dllimport) type
+# define XBT_PUBLIC(type) __declspec(dllimport) type
# define XBT_EXPORT_NO_IMPORT(type) type
# define XBT_IMPORT_NO_EXPORT(type) __declspec(dllimport) type
# define XBT_PUBLIC_DATA(type) extern __declspec(dllimport) type
/* UNIX build */
#else
-# define XBT_PUBLIC(type) extern type
+# define XBT_PUBLIC(type) type
# define XBT_EXPORT_NO_IMPORT(type) type
# define XBT_IMPORT_NO_EXPORT(type) type
# define XBT_PUBLIC_DATA(type) extern type
/** \ingroup SURF_simulation
* \brief List of hosts for which one want to be notified if they ever restart.
*/
-XBT_PUBLIC(xbt_dict_t) watched_hosts_lib;
+XBT_PUBLIC_DATA(xbt_dict_t) watched_hosts_lib;
/*******************************************/
/*** SURF Platform *************************/
double value,
double now,
double delta);
-void TRACE_surf_resource_utilization_alloc(void);
+XBT_PUBLIC(void) TRACE_surf_resource_utilization_alloc(void);
/* instr_paje.c */
extern xbt_dict_t trivaNodeTypes;
SG_BEGIN_DECL()
/********************************* Simcalls *********************************/
-XBT_PUBLIC(const char*) simcall_names[]; /* Name of each simcall */
+XBT_PUBLIC_DATA(const char*) simcall_names[]; /* Name of each simcall */
#include "popping_enum.h" /* Definition of e_smx_simcall_t, with one value per simcall */
#include "mc/mc_forward.h" /* Definition of mc_snapshot_t, used by one simcall */
* @details A CpuAction represent the execution of code on a Cpu
*/
XBT_PUBLIC_CLASS CpuAction : public Action {
-friend CpuPtr getActionCpu(CpuActionPtr action);
+friend XBT_PUBLIC(CpuPtr) getActionCpu(CpuActionPtr action);
public:
/**
* @brief CpuAction constructor
}
extern double sg_sender_gap;
-XBT_PUBLIC(int) SURF_CPU_LEVEL; //Surf cpu level
+XBT_PUBLIC_DATA(int) SURF_CPU_LEVEL; //Surf cpu level
extern surf_callback(void, void) surfExitCallbacks;
SG_BEGIN_DECL()
-extern xbt_dict_t watched_hosts_lib;
+XBT_PUBLIC_DATA(xbt_dict_t) watched_hosts_lib;
extern const char *surf_action_state_names[6];
void surf_AS_get_graph(AS_t as, xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) {
as->getGraph(graph, nodes, edges);
}
-
#ifndef NETWORK_ROUTING_HPP_
#define NETWORK_ROUTING_HPP_
-void routing_model_create( void *loopback);
+XBT_PUBLIC(void) routing_model_create( void *loopback);
/* ************************************************************************** */
/* ************************* GRAPH EXPORTING FUNCTIONS ********************** */
/* A default malloc descriptor for the single sbrk() managed region. */
-XBT_PUBLIC( struct mdesc ) *__mmalloc_default_mdp;
+XBT_PUBLIC_DATA( struct mdesc ) *__mmalloc_default_mdp;
/* Remap a mmalloc region that was previously mapped. */