#include "mc/mc.h"
#include "simgrid/s4u/As.hpp"
#include "simgrid/s4u/engine.hpp"
+#include "simgrid/s4u/mailbox.hpp"
+#include "simgrid/s4u/storage.hpp"
XBT_LOG_NEW_CATEGORY(s4u,"Log channels of the S4U (Simgrid for you) interface");
using namespace simgrid;
return s4u::Engine::instance_;
}
+void s4u::Engine::shutdown() {
+ delete s4u::Engine::instance_;
+ s4u::Engine::instance_ = nullptr;
+ delete s4u::Mailbox::mailboxes;
+ delete s4u::Storage::storages_;
+}
+
double s4u::Engine::getClock()
{
return SIMIX_get_clock();
if(!strcmp(current->name(), name))
return current;
- xbt_dict_cursor_t cursor = NULL;
+ xbt_dict_cursor_t cursor = nullptr;
char *key;
AS_t elem;
xbt_dict_foreach(current->children(), cursor, key, elem) {
simgrid::s4u::As *tmp = asByNameRecursive(elem, name);
- if (tmp != NULL )
+ if (tmp != nullptr )
return tmp;
}
return nullptr;