A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
I forgot to update my tree before commiting (once again), and got conflicts as punishment
[simgrid.git]
/
src
/
simix
/
smx_user.c
diff --git
a/src/simix/smx_user.c
b/src/simix/smx_user.c
index
c0198ab
..
455b98d
100644
(file)
--- a/
src/simix/smx_user.c
+++ b/
src/simix/smx_user.c
@@
-343,6
+343,7
@@
e_smx_state_t simcall_host_execution_wait(smx_action_t execution)
* \param data a pointer to any data one may want to attach to the new object. It is for user-level information and can be NULL.
* It can be retrieved with the function \ref simcall_process_get_data.
* \param hostname name of the host where the new agent is executed.
* \param data a pointer to any data one may want to attach to the new object. It is for user-level information and can be NULL.
* It can be retrieved with the function \ref simcall_process_get_data.
* \param hostname name of the host where the new agent is executed.
+ * \param kill_time time when the process is killed
* \param argc first argument passed to \a code
* \param argv second argument passed to \a code
* \param properties the properties of the process
* \param argc first argument passed to \a code
* \param argv second argument passed to \a code
* \param properties the properties of the process
@@
-351,6
+352,7
@@
void simcall_process_create(smx_process_t *process, const char *name,
xbt_main_func_t code,
void *data,
const char *hostname,
xbt_main_func_t code,
void *data,
const char *hostname,
+ double kill_time,
int argc, char **argv,
xbt_dict_t properties)
{
int argc, char **argv,
xbt_dict_t properties)
{
@@
-362,6
+364,7
@@
void simcall_process_create(smx_process_t *process, const char *name,
simcall->process_create.code = code;
simcall->process_create.data = data;
simcall->process_create.hostname = hostname;
simcall->process_create.code = code;
simcall->process_create.data = data;
simcall->process_create.hostname = hostname;
+ simcall->process_create.kill_time = kill_time;
simcall->process_create.argc = argc;
simcall->process_create.argv = argv;
simcall->process_create.properties = properties;
simcall->process_create.argc = argc;
simcall->process_create.argv = argv;
simcall->process_create.properties = properties;
@@
-697,7
+700,7
@@
smx_action_t simcall_rdv_get_head(smx_rdv_t rdv)
void simcall_comm_send(smx_rdv_t rdv, double task_size, double rate,
void *src_buff, size_t src_buff_size,
void simcall_comm_send(smx_rdv_t rdv, double task_size, double rate,
void *src_buff, size_t src_buff_size,
- int (*match_fun)(void *, void *), void *data,
+ int (*match_fun)(void *, void *
, smx_action_t
), void *data,
double timeout)
{
/* checking for infinite values */
double timeout)
{
/* checking for infinite values */
@@
-732,7
+735,7
@@
void simcall_comm_send(smx_rdv_t rdv, double task_size, double rate,
smx_action_t simcall_comm_isend(smx_rdv_t rdv, double task_size, double rate,
void *src_buff, size_t src_buff_size,
smx_action_t simcall_comm_isend(smx_rdv_t rdv, double task_size, double rate,
void *src_buff, size_t src_buff_size,
- int (*match_fun)(void *, void *),
+ int (*match_fun)(void *, void *
, smx_action_t
),
void (*clean_fun)(void *),
void *data,
int detached)
void (*clean_fun)(void *),
void *data,
int detached)
@@
-761,7
+764,7
@@
smx_action_t simcall_comm_isend(smx_rdv_t rdv, double task_size, double rate,
}
void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
}
void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
- int (*match_fun)(void *, void *), void *data, double timeout)
+ int (*match_fun)(void *, void *
, smx_action_t
), void *data, double timeout)
{
xbt_assert(isfinite(timeout), "timeout is not finite!");
xbt_assert(rdv, "No rendez-vous point defined for recv");
{
xbt_assert(isfinite(timeout), "timeout is not finite!");
xbt_assert(rdv, "No rendez-vous point defined for recv");
@@
-788,7
+791,7
@@
void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
}
smx_action_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
}
smx_action_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
- int (*match_fun)(void *, void *), void *data)
+ int (*match_fun)(void *, void *
, smx_action_t
), void *data)
{
xbt_assert(rdv, "No rendez-vous point defined for irecv");
{
xbt_assert(rdv, "No rendez-vous point defined for irecv");
@@
-1079,8
+1082,6
@@
void simcall_cond_wait_timeout(smx_cond_t cond,
smx_mutex_t mutex,
double timeout)
{
smx_mutex_t mutex,
double timeout)
{
- xbt_ex_t e;
-
xbt_assert(isfinite(timeout), "timeout is not finite!");
smx_simcall_t simcall = SIMIX_simcall_mine();
xbt_assert(isfinite(timeout), "timeout is not finite!");
smx_simcall_t simcall = SIMIX_simcall_mine();
@@
-1090,20
+1091,7
@@
void simcall_cond_wait_timeout(smx_cond_t cond,
simcall->cond_wait_timeout.mutex = mutex;
simcall->cond_wait_timeout.timeout = timeout;
simcall->cond_wait_timeout.mutex = mutex;
simcall->cond_wait_timeout.timeout = timeout;
- TRY {
- SIMIX_simcall_push(simcall->issuer);
- }
- CATCH(e) {
- switch (e.category) {
- case timeout_error:
- simcall->issuer->waiting_action = NULL; // FIXME: should clean ?
- break;
- default:
- break;
- }
- RETHROW;
- xbt_ex_free(e);
- }
+ SIMIX_simcall_push(simcall->issuer);
}
void simcall_cond_broadcast(smx_cond_t cond)
}
void simcall_cond_broadcast(smx_cond_t cond)