-/* Copyright (c) 2016-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2016-2019. 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. */
{
auto promise = std::make_shared<simgrid::kernel::Promise<void>>();
auto future = promise->get_future();
- SIMIX_timer_set(date, [promise] { promise->set_value(); });
+ simgrid::simix::Timer::set(date, [promise] { promise->set_value(); });
return future;
}
-static int master(int /*argc*/, char** /*argv*/)
+static void master()
{
// Test the simple immediate execution:
XBT_INFO("Start");
XBT_INFO("The future is %s", future.is_ready() ? "ready" : "not ready");
res = future.get();
XBT_INFO("kernel_async with value returned with %i", res);
-
- return 0;
}
}
{
SIMIX_global_init(&argc, argv);
xbt_assert(argc == 2, "Usage: %s platform.xml\n", argv[0]);
- simgrid_register_function("master", example::master);
simgrid_load_platform(argv[1]);
- simcall_process_create("master", example::master, NULL, sg_host_by_name("Tremblay"), 0, NULL, NULL);
+ simcall_process_create("master", example::master, NULL, sg_host_by_name("Tremblay"), NULL);
SIMIX_run();
return 0;
}