X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d20f024dba9ff1e9c8822237caaf963b9e913889..61ab0b23d55ea10365ba11d22b8c11b39cbf16e9:/src/simix/popping_private.hpp diff --git a/src/simix/popping_private.hpp b/src/simix/popping_private.hpp index d6c0a5c354..8561f7d574 100644 --- a/src/simix/popping_private.hpp +++ b/src/simix/popping_private.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. 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. */ @@ -15,10 +15,8 @@ #include -extern "C" { - /********************************* Simcalls *********************************/ -XBT_PUBLIC_DATA(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 */ @@ -52,8 +50,8 @@ struct s_smx_simcall { smx_actor_t issuer; smx_timer_t timer; int mc_value; - union u_smx_scalar args[11]; - union u_smx_scalar result; + u_smx_scalar args[11]; + u_smx_scalar result; }; #define SIMCALL_SET_MC_VALUE(simcall, value) ((simcall)->mc_value = (value)) @@ -67,7 +65,6 @@ XBT_PRIVATE void SIMIX_simcall_exit(smx_activity_t synchro); XBT_PRIVATE const char* SIMIX_simcall_name(e_smx_simcall_t kind); XBT_PRIVATE void SIMIX_run_kernel(std::function const* code); XBT_PRIVATE void SIMIX_run_blocking(std::function const* code); -} /* Defines the marshal/unmarshal functions for each type of parameters. * @@ -143,8 +140,8 @@ inline void marshal(type>, u_smx_scalar& simcall, boost: if (value.get() == nullptr) { // Sometimes we return nullptr in an intrusive_ptr... simcall.dp = nullptr; } else { - intrusive_ptr_add_ref(&*value); - simcall.dp = static_cast(&*value); + intrusive_ptr_add_ref(value.get()); + simcall.dp = static_cast(value.get()); } } template inline boost::intrusive_ptr unmarshal(type>, u_smx_scalar const& simcall) @@ -186,6 +183,7 @@ template inline typename std::remove_reference::type unmarshal_raw( template inline void marshalArgs(smx_simcall_t simcall) { + /* Nothing to do when no args */ } template inline void marshalArgs(smx_simcall_t simcall, A const& a)