1 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
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. */
7 #ifndef _SIMIX_HOST_PRIVATE_H
8 #define _SIMIX_HOST_PRIVATE_H
10 #include "simgrid/simix.h"
11 #include "smx_smurf_private.h"
13 /** @brief Host datatype */
14 typedef struct s_smx_host {
15 char *name; /**< @brief host name if any */
16 void *host; /* SURF modeling */
17 xbt_swag_t process_list;
18 xbt_dynar_t auto_restart_processes;
19 void *data; /**< @brief user data */
22 smx_host_t SIMIX_host_create(const char *name, void *workstation, void *data);
23 void SIMIX_host_destroy(void *host);
25 void SIMIX_host_add_auto_restart_process(smx_host_t host,
31 int argc, char **argv,
32 xbt_dict_t properties,
35 void SIMIX_host_restart_processes(smx_host_t host);
36 void SIMIX_host_autorestart(smx_host_t host);
37 xbt_dict_t SIMIX_host_get_properties(u_smx_scalar_t *args);
38 double SIMIX_host_get_speed(u_smx_scalar_t *args);
39 double SIMIX_host_get_available_speed(u_smx_scalar_t *args);
40 int SIMIX_host_get_state(u_smx_scalar_t *args);
41 smx_action_t SIMIX_host_execute(smx_process_t issuer, u_smx_scalar_t *args);
42 smx_action_t SIMIX_host_parallel_execute(u_smx_scalar_t *args);
43 void SIMIX_host_execution_destroy(u_smx_scalar_t *args);
44 void SIMIX_host_execution_cancel(u_smx_scalar_t *args);
45 double SIMIX_host_execution_get_remains(u_smx_scalar_t *args);
46 e_smx_state_t SIMIX_host_execution_get_state(u_smx_scalar_t *args);
47 void SIMIX_host_execution_set_priority(u_smx_scalar_t *args);
48 void SIMIX_pre_host_execution_wait(u_smx_scalar_t *args);
50 void SIMIX_host_execution_suspend(smx_action_t action);
51 void SIMIX_host_execution_resume(smx_action_t action);
53 void SIMIX_post_host_execute(smx_action_t action);
56 void SIMIX_set_category(smx_action_t action, const char *category);