Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
b9e31aa40744905cbc5dc9c41d1ffa560102b757
[simgrid.git] / src / simix / SynchroExec.hpp
1 /* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved.          */
2
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. */
5
6 #ifndef _SIMIX_SYNCHRO_EXEC_HPP
7 #define _SIMIX_SYNCHRO_EXEC_HPP
8
9 #include "surf/surf.h"
10 #include "src/simix/Synchro.h"
11
12 namespace simgrid {
13 namespace simix {
14
15   XBT_PUBLIC_CLASS Exec : public Synchro {
16     ~Exec() override;
17   public:
18     Exec(const char*name, sg_host_t host);
19     void suspend() override;
20     void resume() override;
21     void post() override;
22     double remains();
23
24     sg_host_t host = nullptr; /* The host where the execution takes place. If nullptr, then this is a parallel exec (and only surf knows the hosts) */
25     surf_action_t surf_exec = nullptr; /* The Surf execution action encapsulated */
26   };
27
28 }} // namespace simgrid::simix
29 #endif