typedef struct msg_file_priv* msg_file_t;
/* ******************************** Storage ************************************ */
-/* TODO: PV: to comment */
-
-extern int MSG_STORAGE_LEVEL;
/** @brief Storage datatype.
* @ingroup msg_storage_management
*
* You should consider this as an opaque object.
*/
-typedef xbt_dictelm_t msg_storage_t;
-
-struct msg_storage_priv {
- const char* name;
- const char* hostname;
- sg_size_t size;
- void* data;
-};
-typedef struct msg_storage_priv s_msg_storage_priv_t;
-typedef struct msg_storage_priv* msg_storage_priv_t;
-
-static inline msg_storage_priv_t MSG_storage_priv(msg_storage_t storage){
- return (msg_storage_priv_t )xbt_lib_get_level(storage, MSG_STORAGE_LEVEL);
-}
+typedef sg_storage_t msg_storage_t;
/**
* \brief @brief Communication action.
+++ /dev/null
-/* Copyright (c) 2004-2015. 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. */
-
-#ifndef SURF_SURF_ROUTING_H
-#define SURF_SURF_ROUTING_H
-
-#include "xbt/lib.h"
-
-SG_BEGIN_DECL()
-
-// FIXME: this header file should die
-
-XBT_PUBLIC_DATA(xbt_lib_t) storage_lib;
-XBT_PUBLIC_DATA(int) SURF_STORAGE_LEVEL; // Surf storage level
-
-SG_END_DECL()
-
-#endif /* _SURF_SURF_H */
/* end of eclipse-mandated pimple */
extern int JAVA_HOST_LEVEL;
-static std::unordered_map<char*, jobject> java_storage_map;
+static std::unordered_map<msg_storage_t, jobject> java_storage_map;
JavaVM *get_java_VM();
JNIEnv *get_current_thread_env();
}
env->ReleaseStringUTFChars(jname, name);
- if (java_storage_map.find(storage->key) == java_storage_map.end()) {
+ if (java_storage_map.find(storage) == java_storage_map.end()) {
/* Instantiate a new java storage */
jstorage = jstorage_new_instance(env);
/* the native storage data field is set with the global reference to the
* java storage returned by this function
*/
- java_storage_map.insert({storage->key, jstorage});
+ java_storage_map.insert({storage, jstorage});
} else
- jstorage = java_storage_map.at(storage->key);
+ jstorage = java_storage_map.at(storage);
/* return the global reference to the java storage instance */
return (jobject)jstorage;
for (index = 0; index < count; index++) {
storage = xbt_dynar_get_as(table,index,msg_storage_t);
- if (java_storage_map.find(storage->key) != java_storage_map.end()) {
- jstorage = java_storage_map.at(storage->key);
+ if (java_storage_map.find(storage) != java_storage_map.end()) {
+ jstorage = java_storage_map.at(storage);
} else {
jname = env->NewStringUTF(MSG_storage_get_name(storage));
jstorage = Java_org_simgrid_msg_Storage_getByName(env, cls_arg, jname);
#include "src/internal_config.h"
#include "surf/surf_routing.h"
#include "surf/datatypes.h"
-#include "xbt/lib.h"
#include "simgrid/datatypes.h"
#include "simgrid/forward.h"
typedef surf_StorageModel *surf_storage_model_t;
typedef surf_Storage* surf_storage_t;
-typedef xbt_dictelm_t surf_resource_t;
-
/** @ingroup SURF_c_bindings
* \brief Action structure
*
/* Generic model object */
/***************************/
-static inline surf_storage_t surf_storage_resource_priv(const void* storage)
-{
- return (surf_storage_t)xbt_lib_get_level((xbt_dictelm_t)storage, SURF_STORAGE_LEVEL);
-}
-
-static inline void *surf_storage_resource_by_name(const char *name){
- return xbt_lib_get_elm_or_null(storage_lib, name);
-}
-
/** @{ @ingroup SURF_c_bindings */
/**
* @param resource The surf storage
* @return The size in bytes of the storage
*/
-XBT_PUBLIC(sg_size_t) surf_storage_get_size(surf_resource_t resource);
+XBT_PUBLIC(sg_size_t) surf_storage_get_size(surf_storage_t resource);
/**
* @brief Get the available size in bytes of a storage
* @param resource The surf storage
* @return The available size in bytes of the storage
*/
-XBT_PUBLIC(sg_size_t) surf_storage_get_free_size(surf_resource_t resource);
+XBT_PUBLIC(sg_size_t) surf_storage_get_free_size(surf_storage_t resource);
/**
* @brief Get the size in bytes of a storage
* @param resource The surf storage
* @return The used size in bytes of the storage
*/
-XBT_PUBLIC(sg_size_t) surf_storage_get_used_size(surf_resource_t resource);
+XBT_PUBLIC(sg_size_t) surf_storage_get_used_size(surf_storage_t resource);
/** @brief return the properties set associated to that storage */
-XBT_PUBLIC(xbt_dict_t) surf_storage_get_properties(surf_resource_t resource);
+XBT_PUBLIC(xbt_dict_t) surf_storage_get_properties(surf_storage_t resource);
/**
* @brief [brief description]
* @return The host name
* may not exist.
*/
-XBT_PUBLIC(const char * ) surf_storage_get_host(surf_resource_t resource);
-XBT_PUBLIC(const char * ) surf_storage_get_name(surf_resource_t resource);
+XBT_PUBLIC(const char*) surf_storage_get_host(surf_storage_t resource);
+XBT_PUBLIC(const char*) surf_storage_get_name(surf_storage_t resource);
/** @} */
SIMIX_create_environment(file);
}
-void MSG_post_create_environment() {
- xbt_lib_cursor_t cursor;
- void **data;
- char *name;
-
- /* Initialize MSG storages */
- xbt_lib_foreach(storage_lib, cursor, name, data) {
- __MSG_storage_create(xbt_dict_cursor_get_elm(cursor));
- }
-}
-
msg_netzone_t MSG_zone_get_root()
{
return simgrid::s4u::Engine::instance()->netRoot();
SIMIX_function_register_process_create(MSG_process_create_from_SIMIX);
SIMIX_function_register_process_cleanup(MSG_process_cleanup_from_SIMIX);
- simgrid::s4u::onPlatformCreated.connect(MSG_post_create_environment);
-
simgrid::MsgHostExt::EXTENSION_ID = simgrid::s4u::Host::extension_create<simgrid::MsgHostExt>();
simgrid::s4u::Host::onCreation.connect([](simgrid::s4u::Host& host) {
host.extension_set<simgrid::MsgHostExt>(new simgrid::MsgHostExt());
MC_ignore_heap(&(msg_global->sent_msg), sizeof(msg_global->sent_msg));
}
- XBT_DEBUG("ADD MSG LEVELS");
- MSG_STORAGE_LEVEL = xbt_lib_add_level(storage_lib, (void_f_pvoid_t) __MSG_storage_destroy);
if (xbt_cfg_get_boolean("clean-atexit"))
atexit(MSG_exit);
}
xbt_dict_t storage_list = host->mountedStoragesAsDict();
xbt_dict_foreach(storage_list,cursor,mount_name,storage_name){
- storage = static_cast<msg_storage_t>(xbt_lib_get_elm_or_null(storage_lib,storage_name));
+ storage = simgrid::s4u::Storage::byName(storage_name);
xbt_dict_t content = MSG_storage_get_content(storage);
xbt_dict_set(contents,mount_name, content,nullptr);
}
#include "../surf/StorageImpl.hpp"
#include "simgrid/s4u/Host.hpp"
+#include "simgrid/s4u/Storage.hpp"
#include "src/msg/msg_private.h"
#include <numeric>
return 0;
/* Find the host where the file is physically located and read it */
- msg_storage_t storage_src = static_cast<msg_storage_t>(xbt_lib_get_elm_or_null(storage_lib, fd->storageId));
- msg_storage_priv_t storage_priv_src = MSG_storage_priv(storage_src);
- msg_host_t attached_host = MSG_host_by_name(storage_priv_src->hostname);
+ msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
+ msg_host_t attached_host = MSG_host_by_name(storage_src->host());
read_size = simcall_file_read(fd->simdata->smx_file, size, attached_host);
- if (strcmp(storage_priv_src->hostname, MSG_host_self()->cname())) {
+ if (strcmp(storage_src->host(), MSG_host_self()->cname())) {
/* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
- XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", storage_priv_src->hostname, read_size);
+ XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", storage_src->host(), read_size);
msg_host_t m_host_list[] = {MSG_host_self(), attached_host};
double flops_amount[] = {0, 0};
double bytes_amount[] = {0, 0, static_cast<double>(read_size), 0};
return 0;
/* Find the host where the file is physically located (remote or local)*/
- msg_storage_t storage_src = static_cast<msg_storage_t>(xbt_lib_get_elm_or_null(storage_lib, fd->storageId));
- msg_storage_priv_t storage_priv_src = MSG_storage_priv(storage_src);
- msg_host_t attached_host = MSG_host_by_name(storage_priv_src->hostname);
+ msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
+ msg_host_t attached_host = MSG_host_by_name(storage_src->host());
- if (strcmp(storage_priv_src->hostname, MSG_host_self()->cname())) {
+ if (strcmp(storage_src->host(), MSG_host_self()->cname())) {
/* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
- XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", storage_priv_src->hostname, size);
+ XBT_DEBUG("File is on %s remote host, initiate data transfer of %llu bytes.", storage_src->host(), size);
msg_host_t m_host_list[] = {MSG_host_self(), attached_host};
double flops_amount[] = {0, 0};
double bytes_amount[] = {0, static_cast<double>(size), 0, 0};
msg_error_t MSG_file_unlink(msg_file_t fd)
{
/* Find the host where the file is physically located (remote or local)*/
- msg_storage_t storage_src = static_cast<msg_storage_t>(xbt_lib_get_elm_or_null(storage_lib, fd->storageId));
- msg_storage_priv_t storage_priv_src = MSG_storage_priv(storage_src);
- msg_host_t attached_host = MSG_host_by_name(storage_priv_src->hostname);
+ msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
+ msg_host_t attached_host = MSG_host_by_name(storage_src->host());
int res = simcall_file_unlink(fd->simdata->smx_file, attached_host);
__MSG_file_destroy(fd);
return static_cast<msg_error_t>(res);
msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpath)
{
/* Find the host where the file is physically located and read it */
- msg_storage_t storage_src = static_cast<msg_storage_t>(xbt_lib_get_elm_or_null(storage_lib, file->storageId));
- msg_storage_priv_t storage_priv_src = MSG_storage_priv(storage_src);
- msg_host_t attached_host = MSG_host_by_name(storage_priv_src->hostname);
+ msg_storage_t storage_src = simgrid::s4u::Storage::byName(file->storageId);
+ msg_host_t attached_host = MSG_host_by_name(storage_src->host());
MSG_file_seek(file, 0, SEEK_SET);
sg_size_t read_size = simcall_file_read(file->simdata->smx_file, file->size, attached_host);
if (not strcmp(file_mount_name, mount_name) && strlen(mount_name) > longest_prefix_length) {
/* The current mount name is found in the full path and is bigger than the previous*/
longest_prefix_length = strlen(mount_name);
- storage_dest = (msg_storage_t)xbt_lib_get_elm_or_null(storage_lib, storage_name);
+ storage_dest = simgrid::s4u::Storage::byName(storage_name);
}
xbt_free(file_mount_name);
}
xbt_dict_free(&storage_list);
- char* host_name_dest = nullptr;
if(longest_prefix_length>0){
/* Mount point found, retrieve the host the storage is attached to */
- msg_storage_priv_t storage_dest_priv = MSG_storage_priv(storage_dest);
- host_name_dest = (char*)storage_dest_priv->hostname;
- host_dest = MSG_host_by_name(host_name_dest);
+ host_dest = MSG_host_by_name(storage_dest->host());
}else{
XBT_WARN("Can't find mount point for '%s' on destination host '%s'", fullpath, host->cname());
return MSG_TASK_CANCELED;
}
- XBT_DEBUG("Initiate data transfer of %llu bytes between %s and %s.", read_size, storage_priv_src->hostname,
- host_name_dest);
+ XBT_DEBUG("Initiate data transfer of %llu bytes between %s and %s.", read_size, storage_src->host(),
+ storage_dest->host());
msg_host_t m_host_list[] = {attached_host, host_dest};
double flops_amount[] = {0, 0};
double bytes_amount[] = {0, static_cast<double>(read_size), 0, 0};
if(transfer != MSG_OK){
if (transfer == MSG_HOST_FAILURE)
- XBT_WARN("Transfer error, %s remote host just turned off!", host_name_dest);
+ XBT_WARN("Transfer error, %s remote host just turned off!", storage_dest->host());
if (transfer == MSG_TASK_CANCELED)
XBT_WARN("Transfer error, task has been canceled!");
* (#msg_storage_t) and the functions for managing it.
*/
-msg_storage_t __MSG_storage_create(smx_storage_t storage)
-{
- msg_storage_priv_t storage_private = xbt_new0(s_msg_storage_priv_t, 1);
-
- storage_private->name = surf_storage_get_name(storage);
- storage_private->hostname = surf_storage_get_host(storage);
- storage_private->size = surf_storage_get_size(storage);
-
- xbt_lib_set(storage_lib, storage_private->name, MSG_STORAGE_LEVEL, storage_private);
- return xbt_lib_get_elm_or_null(storage_lib, storage_private->name);
-}
-
-/**
- * \brief Destroys a storage (internal call only)
- */
-void __MSG_storage_destroy(msg_storage_priv_t storage) {
- free(storage);
-}
-
/** \ingroup msg_storage_management
*
* \brief Returns the name of the #msg_storage_t.
*/
const char *MSG_storage_get_name(msg_storage_t storage) {
xbt_assert((storage != nullptr), "Invalid parameters");
- msg_storage_priv_t priv = MSG_storage_priv(storage);
- return priv->name;
+ return storage->name();
}
/** \ingroup msg_storage_management
* \return the free space size of the storage element (as a #sg_size_t)
*/
sg_size_t MSG_storage_get_free_size(msg_storage_t storage){
- return simgrid::simix::kernelImmediate([storage] { return surf_storage_resource_priv(storage)->getFreeSize(); });
+ return storage->sizeFree();
}
/** \ingroup msg_storage_management
* \return the used space size of the storage element (as a #sg_size_t)
*/
sg_size_t MSG_storage_get_used_size(msg_storage_t storage){
- return simgrid::simix::kernelImmediate([storage] { return surf_storage_resource_priv(storage)->getUsedSize(); });
+ return storage->sizeUsed();
}
/** \ingroup msg_storage_management
xbt_dict_t MSG_storage_get_properties(msg_storage_t storage)
{
xbt_assert((storage != nullptr), "Invalid parameters (storage is nullptr)");
- return (simcall_storage_get_properties(storage));
+ return storage->properties();
}
/** \ingroup msg_storage_management
*/
void MSG_storage_set_property_value(msg_storage_t storage, const char* name, char* value)
{
- xbt_dict_set(MSG_storage_get_properties(storage), name, value, nullptr);
+ storage->setProperty(name, value);
}
/** \ingroup m_storage_management
*/
const char *MSG_storage_get_property_value(msg_storage_t storage, const char *name)
{
- return static_cast<char*>(xbt_dict_get_or_null(MSG_storage_get_properties(storage), name));
+ return storage->property(name);
}
/** \ingroup msg_storage_management
*/
msg_storage_t MSG_storage_get_by_name(const char *name)
{
- return static_cast<msg_storage_t>(xbt_lib_get_elm_or_null(storage_lib,name));
+ return simgrid::s4u::Storage::byName(name);
}
/** \ingroup msg_storage_management
* \brief Returns a dynar containing all the storage elements declared at a given point of time
*/
xbt_dynar_t MSG_storages_as_dynar() {
- xbt_lib_cursor_t cursor;
- char *key;
- void **data;
xbt_dynar_t res = xbt_dynar_new(sizeof(msg_storage_t),nullptr);
-
- xbt_lib_foreach(storage_lib, cursor, key, data) {
- if(xbt_lib_get_level(xbt_lib_get_elm_or_null(storage_lib, key), MSG_STORAGE_LEVEL) != nullptr) {
- xbt_dictelm_t elm = xbt_dict_cursor_get_elm(cursor);
- xbt_dynar_push(res, &elm);
- }
+ for (auto s : *simgrid::s4u::allStorages()) {
+ xbt_dynar_push(res, &(s.second));
}
return res;
}
*/
msg_error_t MSG_storage_set_data(msg_storage_t storage, void *data)
{
- msg_storage_priv_t priv = MSG_storage_priv(storage);
- priv->data = data;
+ storage->setUserdata(data);
return MSG_OK;
}
void *MSG_storage_get_data(msg_storage_t storage)
{
xbt_assert((storage != nullptr), "Invalid parameters");
- msg_storage_priv_t priv = MSG_storage_priv(storage);
- return priv->data;
+ return storage->userdata();
}
/** \ingroup msg_storage_management
*/
xbt_dict_t MSG_storage_get_content(msg_storage_t storage)
{
- std::map<std::string, sg_size_t*>* content =
- simgrid::simix::kernelImmediate([storage] { return surf_storage_resource_priv(storage)->getContent(); });
+ std::map<std::string, sg_size_t*>* content = storage->content();
xbt_dict_t content_dict = xbt_dict_new_homogeneous(nullptr);
for (auto entry : *content) {
*/
sg_size_t MSG_storage_get_size(msg_storage_t storage)
{
- msg_storage_priv_t priv = MSG_storage_priv(storage);
- return priv->size;
+ return storage->size();
}
/** \ingroup msg_storage_management
*/
const char *MSG_storage_get_host(msg_storage_t storage) {
xbt_assert((storage != nullptr), "Invalid parameters");
- msg_storage_priv_t priv = MSG_storage_priv(storage);
- return priv->hostname;
+ return storage->host();
}
SG_END_DECL()
/*************************************************************/
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_storage_destroy(msg_storage_priv_t host);
XBT_PRIVATE void __MSG_file_destroy(msg_file_t file);
XBT_PRIVATE void MSG_process_cleanup_from_SIMIX(smx_actor_t smx_proc);
smx_actor_t parent_process);
XBT_PRIVATE void MSG_comm_copy_data_from_SIMIX(smx_activity_t comm, void* buff, size_t buff_size);
-XBT_PRIVATE void MSG_post_create_environment();
-
XBT_PRIVATE void MSG_host_add_task(msg_host_t host, msg_task_t task);
XBT_PRIVATE void MSG_host_del_task(msg_host_t host, msg_task_t task);
return simcall_BODY_file_move(fd, fullpath);
}
-/**
- * \ingroup simix_storage_management
- * \brief Returns a dict of the properties assigned to a storage element.
- *
- * \param storage A storage element
- * \return The properties of this storage element
- */
-xbt_dict_t simcall_storage_get_properties(smx_storage_t storage)
-{
- return simcall_BODY_storage_get_properties(storage);
-}
-
void simcall_run_kernel(std::function<void()> const& code)
{
simcall_BODY_run_kernel(&code);
simgrid::simix::marshal<int>(simcall->result, result);
}
-static inline smx_storage_t simcall_storage_get_properties__get__storage(smx_simcall_t simcall) {
- return simgrid::simix::unmarshal<smx_storage_t>(simcall->args[0]);
-}
-static inline void simcall_storage_get_properties__set__storage(smx_simcall_t simcall, smx_storage_t arg) {
- simgrid::simix::marshal<smx_storage_t>(simcall->args[0], arg);
-}
-static inline xbt_dict_t simcall_storage_get_properties__get__result(smx_simcall_t simcall){
- return simgrid::simix::unmarshal<xbt_dict_t>(simcall->result);
-}
-static inline void simcall_storage_get_properties__set__result(smx_simcall_t simcall, xbt_dict_t result){
- simgrid::simix::marshal<xbt_dict_t>(simcall->result, result);
-}
-
static inline int simcall_mc_random__get__min(smx_simcall_t simcall) {
return simgrid::simix::unmarshal<int>(simcall->args[0]);
}
return simcall<int, smx_file_t, const char*>(SIMCALL_FILE_MOVE, fd, fullpath);
}
-inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_storage_get_properties(storage);
- return simcall<xbt_dict_t, smx_storage_t>(SIMCALL_STORAGE_GET_PROPERTIES, storage);
- }
-
inline static int simcall_BODY_mc_random(int min, int max) {
/* Go to that function to follow the code flow through the simcall barrier */
if (0) simcall_HANDLER_mc_random(&SIMIX_process_self()->simcall, min, max);
SIMCALL_FILE_SEEK,
SIMCALL_FILE_GET_INFO,
SIMCALL_FILE_MOVE,
- SIMCALL_STORAGE_GET_PROPERTIES,
SIMCALL_MC_RANDOM,
SIMCALL_SET_CATEGORY,
SIMCALL_RUN_KERNEL,
"SIMCALL_FILE_SEEK",
"SIMCALL_FILE_GET_INFO",
"SIMCALL_FILE_MOVE",
- "SIMCALL_STORAGE_GET_PROPERTIES",
"SIMCALL_MC_RANDOM",
"SIMCALL_SET_CATEGORY",
"SIMCALL_RUN_KERNEL",
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_STORAGE_GET_PROPERTIES:
- simgrid::simix::marshal<xbt_dict_t>(simcall->result, SIMIX_storage_get_properties(simgrid::simix::unmarshal<smx_storage_t>(simcall->args[0])));
- SIMIX_simcall_answer(simcall);
- break;
-
case SIMCALL_MC_RANDOM:
simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mc_random(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1])));
SIMIX_simcall_answer(simcall);
xbt_dynar_t file_get_info(smx_file_t fd);
int file_move(smx_file_t fd, const char* fullpath);
-xbt_dict_t storage_get_properties(smx_storage_t storage) [[nohandler]];
-
int mc_random(int min, int max);
void set_category(smx_activity_t synchro, const char* category) [[nohandler]];
return surf_host_file_move(host, file->surf_file, fullpath);
}
-xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){
- return surf_storage_get_properties(storage);
-}
-
void SIMIX_io_destroy(smx_activity_t synchro)
{
simgrid::kernel::activity::Io *io = static_cast<simgrid::kernel::activity::Io*>(synchro);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_storage, surf, "Logging specific to the SURF storage module");
xbt_lib_t storage_lib;
-int MSG_STORAGE_LEVEL = -1; // Msg storage level
int SURF_STORAGE_LEVEL = -1;
simgrid::surf::StorageModel* surf_storage_model = nullptr;
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Storage.hpp"
#include "src/kernel/EngineImpl.hpp"
#include "src/simix/smx_private.h"
if (mount_list.empty())
XBT_DEBUG("Create a Mount list for %s", A_surfxml_host_id);
- mount_list.insert(
- {std::string(mount->name), surf_storage_resource_priv(surf_storage_resource_by_name(mount->storageId))});
+ mount_list.insert({std::string(mount->name), simgrid::surf::StorageImpl::byName(mount->storageId)});
}
void sg_platf_new_route(sg_platf_route_cbarg_t route)
return host->pimpl_->fileMove(fd, fullpath);
}
-sg_size_t surf_storage_get_size(surf_resource_t resource){
- return static_cast<simgrid::surf::StorageImpl*>(surf_storage_resource_priv(resource))->size_;
+sg_size_t surf_storage_get_size(surf_storage_t resource)
+{
+ return static_cast<simgrid::surf::StorageImpl*>(resource)->size_;
}
-sg_size_t surf_storage_get_free_size(surf_resource_t resource){
- return static_cast<simgrid::surf::StorageImpl*>(surf_storage_resource_priv(resource))->getFreeSize();
+sg_size_t surf_storage_get_free_size(surf_storage_t resource)
+{
+ return static_cast<simgrid::surf::StorageImpl*>(resource)->getFreeSize();
}
-sg_size_t surf_storage_get_used_size(surf_resource_t resource){
- return static_cast<simgrid::surf::StorageImpl*>(surf_storage_resource_priv(resource))->getUsedSize();
+sg_size_t surf_storage_get_used_size(surf_storage_t resource)
+{
+ return static_cast<simgrid::surf::StorageImpl*>(resource)->getUsedSize();
}
-xbt_dict_t surf_storage_get_properties(surf_resource_t resource){
- return static_cast<simgrid::surf::StorageImpl*>(surf_storage_resource_priv(resource))->getProperties();
+xbt_dict_t surf_storage_get_properties(surf_storage_t resource)
+{
+ return static_cast<simgrid::surf::StorageImpl*>(resource)->getProperties();
}
-const char* surf_storage_get_host(surf_resource_t resource){
- return static_cast<simgrid::surf::StorageImpl*>(surf_storage_resource_priv(resource))->attach_;
+const char* surf_storage_get_host(surf_storage_t resource)
+{
+ return static_cast<simgrid::surf::StorageImpl*>(resource)->attach_;
}
-const char* surf_storage_get_name(surf_resource_t resource){
- return static_cast<simgrid::surf::StorageImpl*>(surf_storage_resource_priv(resource))->cname();
+const char* surf_storage_get_name(surf_storage_t resource)
+{
+ return static_cast<simgrid::surf::StorageImpl*>(resource)->cname();
}
void surf_cpu_action_set_bound(surf_action_t action, double bound) {
include/smpi/smpi_extended_traces.h
include/smpi/smpi_extended_traces_fortran.h
include/smpi/forward.hpp
- include/surf/surf_routing.h
include/xbt.h
include/xbt/RngStream.h
include/xbt/asserts.h