Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Another try to silence sonar on commented lines of code.
[simgrid.git] / src / simix / smx_host_private.h
1 /* Copyright (c) 2007-2017. 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_HOST_PRIVATE_H
7 #define SIMIX_HOST_PRIVATE_H
8
9 #include <functional>
10 #include <map>
11 #include <vector>
12
13 #include <xbt/base.h>
14 #include <xbt/Extendable.hpp>
15
16 #include "simgrid/simix.h"
17 #include "popping_private.h"
18
19 #include "src/kernel/activity/ExecImpl.hpp"
20
21 /** @brief Host datatype from SIMIX POV */
22 namespace simgrid {
23   namespace simix {
24     class ProcessArg;
25
26     class Host {
27     public:
28       static simgrid::xbt::Extension<simgrid::s4u::Host, Host> EXTENSION_ID;
29
30       explicit Host();
31       virtual ~Host();
32
33       xbt_swag_t process_list;
34       std::vector<ProcessArg*> auto_restart_processes;
35       std::vector<ProcessArg*> boot_processes;
36
37       void turnOn();
38     };
39   }
40 }
41
42 SG_BEGIN_DECL()
43 XBT_PRIVATE void SIMIX_host_add_auto_restart_process(sg_host_t host, const char* name, std::function<void()> code,
44                                                      void* data, double kill_time,
45                                                      std::map<std::string, std::string>* properties, int auto_restart);
46
47 XBT_PRIVATE void SIMIX_host_autorestart(sg_host_t host);
48
49 XBT_PRIVATE void SIMIX_execution_finish(simgrid::kernel::activity::ExecImplPtr exec);
50
51 XBT_PRIVATE void SIMIX_set_category(smx_activity_t synchro, const char *category);
52
53 SG_END_DECL()
54
55 XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
56 SIMIX_execution_start(smx_actor_t issuer, const char* name, double flops_amount, double priority, double bound);
57 XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
58 SIMIX_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount,
59                                double* bytes_amount, double rate, double timeout);
60
61 #endif
62