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,
28 REQ_HOST_EXECUTION_SET_CATEGORY,
30 REQ_HOST_EXECUTION_WAIT,
33 REQ_PROCESS_CHANGE_HOST,
41 REQ_PROCESS_IS_SUSPENDED,
42 REQ_PROCESS_GET_PROPERTIES,
47 REQ_RDV_COMM_COUNT_BY_HOST,
59 REQ_COMM_GET_SRC_BUFF,
60 REQ_COMM_GET_DST_BUFF,
61 REQ_COMM_GET_SRC_BUFF_SIZE,
62 REQ_COMM_GET_DST_BUFF_SIZE,
63 REQ_COMM_GET_SRC_PROC,
64 REQ_COMM_GET_DST_PROC,
65 #ifdef HAVE_LATENCY_BOUND_TRACKING
66 REQ_COMM_IS_LATENCY_BOUNDED,
77 REQ_COND_WAIT_TIMEOUT,
84 REQ_SEM_ACQUIRE_TIMEOUT,
88 typedef struct s_smx_req {
89 s_xbt_swag_hookup_t state_hookup;
108 } host_get_properties;
118 } host_get_available_speed;
138 double computation_amount;
145 smx_host_t *host_list;
146 double *computation_amount;
147 double *communication_amount;
151 } host_parallel_execute;
154 smx_action_t execution;
155 } host_execution_destroy;
158 smx_action_t execution;
159 } host_execution_cancel;
162 smx_action_t execution;
164 } host_execution_get_remains;
167 smx_action_t execution;
168 e_smx_state_t result;
169 } host_execution_get_state;
172 smx_action_t execution;
174 } host_execution_set_priority;
178 smx_action_t execution;
179 const char *category;
180 } host_execution_set_category;
184 smx_action_t execution;
185 } host_execution_wait;
189 xbt_main_func_t code;
191 const char *hostname;
194 xbt_dict_t properties;
195 smx_process_t result;
199 smx_process_t process;
203 smx_process_t process;
206 } process_change_host;
209 smx_process_t process;
213 smx_process_t process;
221 smx_process_t process;
226 smx_process_t process;
231 smx_process_t process;
236 smx_process_t process;
241 smx_process_t process;
243 } process_is_suspended;
246 smx_process_t process;
248 } process_get_properties;
252 e_smx_state_t result;
273 } rdv_comm_count_by_host;
285 size_t src_buff_size;
293 size_t *dst_buff_size;
327 e_smx_state_t result;
348 } comm_get_src_buff_size;
353 } comm_get_dst_buff_size;
357 smx_process_t result;
362 smx_process_t result;
365 #ifdef HAVE_LATENCY_BOUND_TRACKING
369 } comm_is_latency_bounded;
445 } sem_acquire_timeout;
452 } s_smx_req_t, *smx_req_t;
454 /******************************** General *************************************/
456 void SIMIX_request_init(void);
457 void SIMIX_request_destroy(void);
458 void SIMIX_request_push(smx_req_t);
459 smx_req_t SIMIX_request_pop(void);
460 void SIMIX_request_answer(smx_req_t);
461 void SIMIX_request_pre(smx_req_t);
462 void SIMIX_request_post(smx_action_t);
463 int SIMIX_request_is_visible(smx_req_t req);
464 int SIMIX_request_is_enabled(smx_req_t req);