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_SMURF_PRIVATE_H
8 #define _SIMIX_SMURF_PRIVATE_H
10 /********************************* Requests ***********************************/
14 REQ_HOST_GET_PROPERTIES,
16 REQ_HOST_GET_AVAILABLE_SPEED,
21 REQ_HOST_PARALLEL_EXECUTE,
22 REQ_HOST_EXECUTION_DESTROY,
23 REQ_HOST_EXECUTION_CANCEL,
24 REQ_HOST_EXECUTION_GET_REMAINS,
25 REQ_HOST_EXECUTION_GET_STATE,
26 REQ_HOST_EXECUTION_SET_PRIORITY,
27 REQ_HOST_EXECUTION_WAIT,
30 REQ_PROCESS_CHANGE_HOST,
38 REQ_PROCESS_IS_SUSPENDED,
39 REQ_PROCESS_GET_PROPERTIES,
44 REQ_RDV_COMM_COUNT_BY_HOST,
57 REQ_COMM_GET_SRC_BUFF,
58 REQ_COMM_GET_DST_BUFF,
59 REQ_COMM_GET_SRC_BUFF_SIZE,
60 REQ_COMM_GET_DST_BUFF_SIZE,
61 REQ_COMM_GET_SRC_PROC,
62 REQ_COMM_GET_DST_PROC,
63 #ifdef HAVE_LATENCY_BOUND_TRACKING
64 REQ_COMM_IS_LATENCY_BOUNDED,
78 REQ_COND_WAIT_TIMEOUT,
85 REQ_SEM_ACQUIRE_TIMEOUT,
89 typedef struct s_smx_req {
90 s_xbt_swag_hookup_t state_hookup;
109 } host_get_properties;
119 } host_get_available_speed;
139 double computation_amount;
146 smx_host_t *host_list;
147 double *computation_amount;
148 double *communication_amount;
152 } host_parallel_execute;
155 smx_action_t execution;
156 } host_execution_destroy;
159 smx_action_t execution;
160 } host_execution_cancel;
163 smx_action_t execution;
165 } host_execution_get_remains;
168 smx_action_t execution;
169 e_smx_state_t result;
170 } host_execution_get_state;
173 smx_action_t execution;
175 } host_execution_set_priority;
178 smx_action_t execution;
179 } host_execution_wait;
183 xbt_main_func_t code;
185 const char *hostname;
188 xbt_dict_t properties;
189 smx_process_t result;
193 smx_process_t process;
197 smx_process_t process;
200 } process_change_host;
203 smx_process_t process;
207 smx_process_t process;
215 smx_process_t process;
220 smx_process_t process;
225 smx_process_t process;
230 smx_process_t process;
235 smx_process_t process;
237 } process_is_suspended;
240 smx_process_t process;
242 } process_get_properties;
246 e_smx_state_t result;
267 } rdv_comm_count_by_host;
279 size_t src_buff_size;
287 size_t *dst_buff_size;
326 e_smx_state_t result;
347 } comm_get_src_buff_size;
352 } comm_get_dst_buff_size;
356 smx_process_t result;
361 smx_process_t result;
364 #ifdef HAVE_LATENCY_BOUND_TRACKING
368 } comm_is_latency_bounded;
374 const char *category;
451 } sem_acquire_timeout;
458 } s_smx_req_t, *smx_req_t;
460 /******************************** General *************************************/
462 void SIMIX_request_init(void);
463 void SIMIX_request_destroy(void);
464 void SIMIX_request_push(smx_req_t);
465 smx_req_t SIMIX_request_pop(void);
466 void SIMIX_request_answer(smx_req_t);
467 void SIMIX_request_pre(smx_req_t);
468 void SIMIX_request_post(smx_action_t);
469 int SIMIX_request_is_visible(smx_req_t req);
470 int SIMIX_request_is_enabled(smx_req_t req);