From 9bf3d6642fe270799d6fe2ce759c0c6c82120434 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Fri, 20 Jul 2018 13:48:14 +0200 Subject: [PATCH] use our new toys --- src/s4u/s4u_Actor.cpp | 4 ++-- src/s4u/s4u_Exec.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index 3548aba60b..b1f74569ab 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -285,12 +285,12 @@ XBT_PUBLIC void sleep_until(double timeout) void execute(double flops) { - get_host()->execute(flops); + execute(flops, 1.0 /* priority */); } void execute(double flops, double priority) { - get_host()->execute(flops, priority); + exec_init(flops)->set_priority(priority)->start()->wait(); } void parallel_execute(int host_nb, s4u::Host** host_list, double* flops_amount, double* bytes_amount, double timeout) diff --git a/src/s4u/s4u_Exec.cpp b/src/s4u/s4u_Exec.cpp index 2d8cb1911b..52f05cb60f 100644 --- a/src/s4u/s4u_Exec.cpp +++ b/src/s4u/s4u_Exec.cpp @@ -15,8 +15,7 @@ namespace s4u { Activity* Exec::start() { - pimpl_ = simcall_execution_start("", flops_amount_, 1. / priority_, 0., host_); - boost::static_pointer_cast(pimpl_)->set_bound(bound_); + pimpl_ = simcall_execution_start("", flops_amount_, 1. / priority_, bound_, host_); state_ = State::STARTED; return this; } -- 2.20.1