#include "xbt/ex.h" /* ex_backtrace_display */
#include "xbt/replay.h"
#include "simgrid/sg_config.h" /* Configuration mechanism of SimGrid */
-#include "src/surf/callbacks.h"
#include "src/surf/xml/platf_private.hpp" // FIXME: KILLME by removing MSG_post_create_environment()
XBT_LOG_NEW_CATEGORY(msg, "All MSG categories");
#endif
#include "src/surf/surf_interface.hpp"
+#include "src/surf/storage_interface.hpp"
#include "src/surf/xml/platf.hpp"
#include "smx_private.h"
#include "smx_private.hpp"
#include "src/mc/mc_replay.h"
#include "simgrid/sg_config.h"
-#include "src/surf/callbacks.h"
-
#ifdef HAVE_MC
#include "src/mc/mc_private.h"
#include "src/mc/mc_protocol.h"
simgrid::s4u::Host::onCreation.connect([](simgrid::s4u::Host& host) {
SIMIX_host_create(&host);
});
- surf_on_storage_created(SIMIX_storage_create_);
+ simgrid::surf::storageCreatedCallbacks.connect([](simgrid::surf::Storage* storage) {
+ const char* id = storage->getName();
+ // TODO, create sg_storage_by_name
+ sg_storage_t s = xbt_lib_get_elm_or_null(storage_lib, id);
+ xbt_assert(s != NULL, "Storage not found for name %s", id);
+ SIMIX_storage_create_(s);
+ });
+
}
if (!simix_timers) {
+++ /dev/null
-/* Copyright (c) 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. */
-
-#include <xbt/asserts.h>
-
-#include "src/surf/callbacks.h"
-
-#include "src/surf/HostImplem.hpp"
-#include "src/surf/surf_interface.hpp"
-
-void surf_on_storage_created(void (*callback)(sg_storage_t))
-{
- simgrid::surf::storageCreatedCallbacks.connect([callback](simgrid::surf::Storage* storage) {
- const char* id = storage->getName();
- // TODO, create sg_storage_by_name
- sg_storage_t s = xbt_lib_get_elm_or_null(storage_lib, id);
- xbt_assert(s != NULL, "Storage not found for name %s", id);
- callback(s);
- });
-}
+++ /dev/null
-/* Copyright (c) 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 SIMGRID_SURF_CALLBACKS_H
-#define SIMGRID_SURF_CALLBACKS_H
-
-/** \file callbacks.h
- *
- * C interface for the C++ SURF callbacks.
- */
-
-#include <xbt/base.h>
-#include "simgrid/host.h"
-#include "simgrid/msg.h"
-
-SG_BEGIN_DECL();
-
-XBT_PRIVATE void surf_on_storage_created(void (*callback)(sg_storage_t));
-
-SG_END_DECL();
-
-#endif
)
set(SURF_SRC
- src/surf/callbacks.h
- src/surf/callbacks.cpp
src/surf/cpu_cas01.cpp
src/surf/cpu_interface.cpp
src/surf/cpu_ti.cpp