-
-#ifdef MSG_USE_DEPRECATED
-# define PROCESS_SET_ERRNO(val) \
- (((simdata_process_t) SIMIX_process_self_get_data(SIMIX_process_self()))->last_errno=val)
-# define PROCESS_GET_ERRNO() \
- (((simdata_process_t) SIMIX_process_self_get_data(SIMIX_process_self()))->last_errno)
-#define MSG_RETURN(val) do {PROCESS_SET_ERRNO(val);return(val);} while(0)
-/* #define CHECK_ERRNO() ASSERT((PROCESS_GET_ERRNO()!=MSG_HOST_FAILURE),"Host failed, you cannot call this function.") */
-
-#else
-# define MSG_RETURN(val) return(val)
-#endif
-
-msg_host_t __MSG_host_create(smx_host_t workstation);
-msg_storage_t __MSG_storage_create(smx_storage_t storage);
-void __MSG_host_destroy(msg_host_t host);
-void __MSG_storage_destroy(msg_storage_priv_t host);
-void __MSG_file_destroy(msg_file_priv_t host);
-
-void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc);
-void MSG_process_create_from_SIMIX(smx_process_t *process, const char *name,
- xbt_main_func_t code, void *data,
+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);
+
+XBT_PRIVATE void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc);
+XBT_PRIVATE smx_process_t MSG_process_create_from_SIMIX(const char *name,
+ std::function<void()> code, void *data,