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
Check return value for posix_memalign.
[simgrid.git]
/
src
/
simix
/
smx_new_api.c
diff --git
a/src/simix/smx_new_api.c
b/src/simix/smx_new_api.c
index
5f7fcc6
..
f419842
100644
(file)
--- a/
src/simix/smx_new_api.c
+++ b/
src/simix/smx_new_api.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007
, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2007
-2010, 2012-2014
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-43,7
+43,7
@@
void SIMIX_post_new_api(smx_action_t action)
}
}
}
}
- switch (surf_
workstation_model->action_state_get
(action->new_api.surf_new_api)) {
+ switch (surf_
action_get_state
(action->new_api.surf_new_api)) {
case SURF_ACTION_FAILED:
action->state = SIMIX_FAILED;
case SURF_ACTION_FAILED:
action->state = SIMIX_FAILED;
@@
-67,8
+67,7
@@
smx_action_t SIMIX_new_api_fct(smx_process_t process, const char* param1, double
smx_host_t host = process->smx_host;
/* check if the host is active */
smx_host_t host = process->smx_host;
/* check if the host is active */
- if (surf_workstation_model->extension.
- workstation.get_state(host) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
@@
-81,9
+80,9
@@
smx_action_t SIMIX_new_api_fct(smx_process_t process, const char* param1, double
#endif
// Called the function from the new model
#endif
// Called the function from the new model
- action->new_api.surf_new_api = surf_workstation_model->extension.new_model.fct();
+
//FIXME:CHECK WHAT TO DO
action->new_api.surf_new_api = surf_workstation_model->extension.new_model.fct();
- surf_
workstation_model->action_data_set
(action->new_api.surf_new_api, action);
+ surf_
action_set_data
(action->new_api.surf_new_api, action);
XBT_DEBUG("Create NEW MODEL action %p", action);
return action;
XBT_DEBUG("Create NEW MODEL action %p", action);
return action;
@@
-93,7
+92,7
@@
void SIMIX_new_api_destroy(smx_action_t action)
{
XBT_DEBUG("Destroy action %p", action);
if (action->new_api.surf_new_api)
{
XBT_DEBUG("Destroy action %p", action);
if (action->new_api.surf_new_api)
-
action->new_api.surf_new_api->model_obj->
action_unref(action->new_api.surf_new_api);
+
surf_
action_unref(action->new_api.surf_new_api);
xbt_mallocator_release(simix_global->action_mallocator, action);
}
xbt_mallocator_release(simix_global->action_mallocator, action);
}
@@
-123,8
+122,7
@@
void SIMIX_new_api_finish(smx_action_t action)
(int)action->state);
}
(int)action->state);
}
- if (surf_workstation_model->extension.
- workstation.get_state(simcall->issuer->smx_host) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
simcall->issuer->context->iwannadie = 1;
}
simcall->issuer->context->iwannadie = 1;
}