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,
56 REQ_COMM_GET_SRC_DATA,
57 REQ_COMM_GET_DST_DATA,
58 REQ_COMM_GET_SRC_BUFF,
59 REQ_COMM_GET_DST_BUFF,
60 REQ_COMM_GET_SRC_BUFF_SIZE,
61 REQ_COMM_GET_DST_BUFF_SIZE,
62 REQ_COMM_GET_SRC_PROC,
63 REQ_COMM_GET_DST_PROC,
64 #ifdef HAVE_LATENCY_BOUND_TRACKING
65 REQ_COMM_IS_LATENCY_BOUNDED,
79 REQ_COND_WAIT_TIMEOUT,
86 REQ_SEM_ACQUIRE_TIMEOUT,
90 typedef struct s_smx_req {
91 s_xbt_swag_hookup_t state_hookup;
110 } host_get_properties;
120 } host_get_available_speed;
140 double computation_amount;
147 smx_host_t *host_list;
148 double *computation_amount;
149 double *communication_amount;
153 } host_parallel_execute;
156 smx_action_t execution;
157 } host_execution_destroy;
160 smx_action_t execution;
161 } host_execution_cancel;
164 smx_action_t execution;
166 } host_execution_get_remains;
169 smx_action_t execution;
170 e_smx_state_t result;
171 } host_execution_get_state;
174 smx_action_t execution;
176 } host_execution_set_priority;
179 smx_action_t execution;
180 } host_execution_wait;
184 xbt_main_func_t code;
186 const char *hostname;
189 xbt_dict_t properties;
190 smx_process_t result;
194 smx_process_t process;
198 smx_process_t process;
201 } process_change_host;
204 smx_process_t process;
208 smx_process_t process;
216 smx_process_t process;
221 smx_process_t process;
226 smx_process_t process;
231 smx_process_t process;
236 smx_process_t process;
238 } process_is_suspended;
241 smx_process_t process;
243 } process_get_properties;
247 e_smx_state_t result;
268 } rdv_comm_count_by_host;
280 size_t src_buff_size;
281 int (*match_fun)(void *, void *);
289 size_t *dst_buff_size;
290 int (*match_fun)(void *, void *);
330 e_smx_state_t result;
356 } comm_get_src_buff_size;
361 } comm_get_dst_buff_size;
365 smx_process_t result;
370 smx_process_t result;
373 #ifdef HAVE_LATENCY_BOUND_TRACKING
377 } comm_is_latency_bounded;
383 const char *category;
460 } sem_acquire_timeout;
467 } s_smx_req_t, *smx_req_t;
469 /******************************** General *************************************/
471 void SIMIX_request_init(void);
472 void SIMIX_request_destroy(void);
473 void SIMIX_request_push(smx_req_t);
474 smx_req_t SIMIX_request_pop(void);
475 void SIMIX_request_answer(smx_req_t);
476 void SIMIX_request_pre(smx_req_t);
477 void SIMIX_request_post(smx_action_t);
478 int SIMIX_request_is_visible(smx_req_t req);
479 int SIMIX_request_is_enabled(smx_req_t req);