Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "kill one simcall, simplify another"
[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 <vector>
10 #include <functional>
11
12 #include <xbt/base.h>
13 #include <xbt/Extendable.hpp>
14
15 #include "simgrid/simix.h"
16 #include "popping_private.h"
17
18 #include "src/kernel/activity/ExecImpl.hpp"
19
20 /** @brief Host datatype from SIMIX POV */
21 namespace simgrid {
22   namespace simix {
23     class ProcessArg;
24
25     class Host {
26     public:
27       static simgrid::xbt::Extension<simgrid::s4u::Host, Host> EXTENSION_ID;
28
29       explicit Host();
30       virtual ~Host();
31
32       xbt_swag_t process_list;
33       std::vector<ProcessArg*> auto_restart_processes;
34       std::vector<ProcessArg*> boot_processes;
35
36       void turnOn();
37     };
38   }
39 }
40
41 SG_BEGIN_DECL()
42 XBT_PRIVATE void SIMIX_host_add_auto_restart_process(sg_host_t host,
43                                          const char *name,
44                                          std::function<void()> code,
45                                          void *data,
46                                          double kill_time,
47                                          xbt_dict_t properties,
48                                          int auto_restart);
49
50 XBT_PRIVATE void SIMIX_host_autorestart(sg_host_t host);
51 XBT_PRIVATE void SIMIX_execution_cancel(smx_activity_t synchro);
52 XBT_PRIVATE void SIMIX_execution_set_priority(smx_activity_t synchro, double priority);
53 XBT_PRIVATE void SIMIX_execution_set_bound(smx_activity_t synchro, double bound);
54
55 XBT_PRIVATE void SIMIX_execution_finish(simgrid::kernel::activity::ExecImplPtr exec);
56
57 XBT_PRIVATE void SIMIX_set_category(smx_activity_t synchro, const char *category);
58
59 SG_END_DECL()
60
61 XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
62 SIMIX_execution_start(smx_actor_t issuer, const char* name, double flops_amount, double priority, double bound);
63 XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
64 SIMIX_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount,
65                                double* bytes_amount, double amount, double rate, double timeout);
66
67 #endif
68