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_BUFF,
57 REQ_COMM_GET_DST_BUFF,
58 REQ_COMM_GET_SRC_BUFF_SIZE,
59 REQ_COMM_GET_DST_BUFF_SIZE,
60 REQ_COMM_GET_SRC_PROC,
61 REQ_COMM_GET_DST_PROC,
62 #ifdef HAVE_LATENCY_BOUND_TRACKING
63 REQ_COMM_IS_LATENCY_BOUNDED,
74 REQ_COND_WAIT_TIMEOUT,
81 REQ_SEM_ACQUIRE_TIMEOUT,
85 typedef struct s_smx_req {
86 s_xbt_swag_hookup_t state_hookup;
105 } host_get_properties;
115 } host_get_available_speed;
135 double computation_amount;
142 smx_host_t *host_list;
143 double *computation_amount;
144 double *communication_amount;
148 } host_parallel_execute;
151 smx_action_t execution;
152 } host_execution_destroy;
155 smx_action_t execution;
156 } host_execution_cancel;
159 smx_action_t execution;
161 } host_execution_get_remains;
164 smx_action_t execution;
165 e_smx_state_t result;
166 } host_execution_get_state;
169 smx_action_t execution;
171 } host_execution_set_priority;
174 smx_action_t execution;
175 } host_execution_wait;
179 xbt_main_func_t code;
181 const char *hostname;
184 xbt_dict_t properties;
185 smx_process_t result;
189 smx_process_t process;
193 smx_process_t process;
196 } process_change_host;
199 smx_process_t process;
203 smx_process_t process;
211 smx_process_t process;
216 smx_process_t process;
221 smx_process_t process;
226 smx_process_t process;
231 smx_process_t process;
233 } process_is_suspended;
236 smx_process_t process;
238 } process_get_properties;
242 e_smx_state_t result;
263 } rdv_comm_count_by_host;
275 size_t src_buff_size;
283 size_t *dst_buff_size;
317 e_smx_state_t result;
338 } comm_get_src_buff_size;
343 } comm_get_dst_buff_size;
347 smx_process_t result;
352 smx_process_t result;
355 #ifdef HAVE_LATENCY_BOUND_TRACKING
359 } comm_is_latency_bounded;
435 } sem_acquire_timeout;
442 } s_smx_req_t, *smx_req_t;
444 /******************************** General *************************************/
446 void SIMIX_request_init(void);
447 void SIMIX_request_destroy(void);
448 void SIMIX_request_push(smx_req_t);
449 smx_req_t SIMIX_request_pop(void);
450 void SIMIX_request_answer(smx_req_t);
451 void SIMIX_request_pre(smx_req_t);
452 void SIMIX_request_post(smx_action_t);
453 int SIMIX_request_is_visible(smx_req_t req);
454 int SIMIX_request_is_enabled(smx_req_t req);