Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove SIMIX_host_get_current_power_peak() and SIMIX_host_get_power_peak_at()
[simgrid.git] / src / simix / smx_host_private.h
1 /* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _SIMIX_HOST_PRIVATE_H
8 #define _SIMIX_HOST_PRIVATE_H
9
10 #include <xbt/base.h>
11
12 #include "simgrid/simix.h"
13 #include "popping_private.h"
14
15 SG_BEGIN_DECL()
16
17 /** @brief Host datatype from SIMIX POV */
18 typedef struct s_smx_host_priv {
19   xbt_swag_t process_list;
20   xbt_dynar_t auto_restart_processes;
21   xbt_dynar_t boot_processes;
22 } s_smx_host_priv_t;
23
24 XBT_PRIVATE void _SIMIX_host_free_process_arg(void *);
25 XBT_PRIVATE void SIMIX_host_create(sg_host_t host);
26 XBT_PRIVATE void SIMIX_host_destroy(void *host);
27
28 XBT_PRIVATE void SIMIX_host_add_auto_restart_process(sg_host_t host,
29                                          const char *name,
30                                          xbt_main_func_t code,
31                                          void *data,
32                                          const char *hostname,
33                                          double kill_time,
34                                          int argc, char **argv,
35                                          xbt_dict_t properties,
36                                          int auto_restart);
37
38 XBT_PRIVATE void SIMIX_host_restart_processes(sg_host_t host);
39 XBT_PRIVATE void SIMIX_host_autorestart(sg_host_t host);
40 XBT_PRIVATE smx_synchro_t SIMIX_process_execute(smx_process_t issuer, const char *name,
41     double flops_amount, double priority, double bound, unsigned long affinity_mask);
42 XBT_PRIVATE smx_synchro_t SIMIX_process_parallel_execute(const char *name,
43     int host_nb, sg_host_t *host_list,
44     double *flops_amount, double *bytes_amount,
45     double amount, double rate);
46 XBT_PRIVATE void SIMIX_process_execution_destroy(smx_synchro_t synchro);
47 XBT_PRIVATE void SIMIX_process_execution_cancel(smx_synchro_t synchro);
48 XBT_PRIVATE double SIMIX_process_execution_get_remains(smx_synchro_t synchro);
49 XBT_PRIVATE e_smx_state_t SIMIX_process_execution_get_state(smx_synchro_t synchro);
50 XBT_PRIVATE void SIMIX_process_execution_set_priority(smx_synchro_t synchro, double priority);
51 XBT_PRIVATE void SIMIX_process_execution_set_bound(smx_synchro_t synchro, double bound);
52 XBT_PRIVATE void SIMIX_process_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask);
53 XBT_PRIVATE xbt_dynar_t SIMIX_host_get_attached_storage_list(sg_host_t host);
54
55 XBT_PRIVATE void SIMIX_host_execution_suspend(smx_synchro_t synchro);
56 XBT_PRIVATE void SIMIX_host_execution_resume(smx_synchro_t synchro);
57
58 XBT_PRIVATE void SIMIX_post_host_execute(smx_synchro_t synchro);
59 XBT_PRIVATE void SIMIX_set_category(smx_synchro_t synchro, const char *category);
60
61 /* vm related stuff */
62 XBT_PRIVATE sg_host_t SIMIX_vm_create(const char *name, sg_host_t ind_phys_host);
63
64 XBT_PRIVATE void SIMIX_vm_destroy(sg_host_t ind_vm);
65 // --
66 XBT_PRIVATE void SIMIX_vm_resume(sg_host_t ind_vm, smx_process_t issuer);
67
68 XBT_PRIVATE void SIMIX_vm_suspend(sg_host_t ind_vm, smx_process_t issuer);
69 // --
70 XBT_PRIVATE void SIMIX_vm_save(sg_host_t ind_vm, smx_process_t issuer);
71
72 XBT_PRIVATE void SIMIX_vm_restore(sg_host_t ind_vm, smx_process_t issuer);
73 // --
74 XBT_PRIVATE void SIMIX_vm_start(sg_host_t ind_vm);
75
76 XBT_PRIVATE void SIMIX_vm_shutdown(sg_host_t ind_vm, smx_process_t issuer);
77 // --
78
79 XBT_PRIVATE e_surf_vm_state_t SIMIX_vm_get_state(sg_host_t ind_vm);
80 // --
81 XBT_PRIVATE void SIMIX_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm);
82
83 XBT_PRIVATE void *SIMIX_vm_get_pm(sg_host_t ind_vm);
84
85 XBT_PRIVATE void SIMIX_vm_set_bound(sg_host_t ind_vm, double bound);
86
87 XBT_PRIVATE void SIMIX_vm_set_affinity(sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask);
88
89 XBT_PRIVATE void SIMIX_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm);
90
91 XBT_PRIVATE void SIMIX_host_get_params(sg_host_t ind_vm, vm_params_t params);
92
93 XBT_PRIVATE void SIMIX_host_set_params(sg_host_t ind_vm, vm_params_t params);
94
95 SG_END_DECL()
96
97 #endif
98