X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9f07b2143b628041a4766877fc3cf518ffc88904..32df9acdb9c57513bf704fab767117eaccdcecc9:/src/msg/msg_private.h diff --git a/src/msg/msg_private.h b/src/msg/msg_private.h index 4270fd8771..e675c36740 100644 --- a/src/msg/msg_private.h +++ b/src/msg/msg_private.h @@ -12,13 +12,23 @@ #include "src/kernel/activity/SynchroExec.hpp" #include "src/kernel/activity/SynchroComm.hpp" +#include + SG_BEGIN_DECL() /**************** datatypes **********************************/ -/********************************* Host **************************************/ -typedef struct s_msg_host_priv { - std::vector *file_descriptor_table; -} s_msg_host_priv_t; +/**************************** Host Extension *********************************/ +namespace simgrid { +class MsgHostExt { +public: + static simgrid::xbt::Extension EXTENSION_ID; + + ~MsgHostExt() { + delete file_descriptor_table; + } + std::vector* file_descriptor_table = nullptr; // Created lazily on need +}; +} /********************************* Task **************************************/ typedef struct simdata_task { @@ -109,7 +119,6 @@ XBT_PUBLIC_DATA(MSG_Global_t) msg_global; /*************************************************************/ XBT_PRIVATE msg_host_t __MSG_host_create(sg_host_t host); XBT_PRIVATE msg_storage_t __MSG_storage_create(smx_storage_t storage); -XBT_PRIVATE void __MSG_host_priv_free(msg_host_priv_t priv); XBT_PRIVATE void __MSG_storage_destroy(msg_storage_priv_t host); XBT_PRIVATE void __MSG_file_destroy(msg_file_priv_t host);