1 /* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMIX_SYNCHRO_EXEC_HPP
7 #define SIMIX_SYNCHRO_EXEC_HPP
9 #include "src/kernel/activity/ActivityImpl.hpp"
10 #include "surf/surf.hpp"
16 XBT_PUBLIC_CLASS ExecImpl : public ActivityImpl
21 explicit ExecImpl(const char* name, sg_host_t host);
22 void suspend() override;
23 void resume() override;
26 double remainingRatio();
28 /* The host where the execution takes place. If nullptr, then this is a parallel exec (and only surf
30 sg_host_t host_ = nullptr;
31 surf_action_t surfAction_ = nullptr; /* The Surf execution action encapsulated */
32 surf::Action* timeoutDetector = nullptr;
33 static simgrid::xbt::signal<void(kernel::activity::ExecImplPtr)> onCreation;
34 static simgrid::xbt::signal<void(kernel::activity::ExecImplPtr)> onDestruction;
38 } // namespace simgrid::kernel::activity