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
Merge branch 'master' into master-svn
[simgrid.git]
/
src
/
msg
/
m_process.c
diff --git
a/src/msg/m_process.c
b/src/msg/m_process.c
index
b54f233
..
99e606a
100644
(file)
--- a/
src/msg/m_process.c
+++ b/
src/msg/m_process.c
@@
-43,7
+43,6
@@
void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
#endif
xbt_free(msg_proc);
#endif
xbt_free(msg_proc);
- SIMIX_req_process_cleanup(smx_proc);
}
/* This function creates a MSG process. It has the prototype enforced by SIMIX_function_register_process_create */
}
/* This function creates a MSG process. It has the prototype enforced by SIMIX_function_register_process_create */
@@
-139,7
+138,7
@@
m_process_t MSG_process_create_with_environment(const char *name,
int argc, char **argv,
xbt_dict_t properties)
{
int argc, char **argv,
xbt_dict_t properties)
{
- xbt_assert
0
(code != NULL && host != NULL, "Invalid parameters");
+ xbt_assert(code != NULL && host != NULL, "Invalid parameters");
simdata_process_t simdata = xbt_new0(s_simdata_process_t, 1);
m_process_t process;
simdata_process_t simdata = xbt_new0(s_simdata_process_t, 1);
m_process_t process;
@@
-214,16
+213,15
@@
void MSG_process_kill(m_process_t process)
* This function checks whether \a process and \a host are valid pointers
and change the value of the #m_host_t on which \a process is running.
*/
* This function checks whether \a process and \a host are valid pointers
and change the value of the #m_host_t on which \a process is running.
*/
-MSG_error_t MSG_process_
change_host(
m_host_t host)
+MSG_error_t MSG_process_
migrate(m_process_t process,
m_host_t host)
{
{
- m_process_t process = MSG_process_self();
- simdata_process_t simdata = SIMIX_process_self_get_data();
- m_host_t now = simdata->m_host;
+ simdata_process_t simdata = SIMIX_req_process_get_data(process);
simdata->m_host = host;
#ifdef HAVE_TRACING
simdata->m_host = host;
#ifdef HAVE_TRACING
+ m_host_t now = simdata->m_host;
TRACE_msg_process_change_host(process, now, host);
#endif
TRACE_msg_process_change_host(process, now, host);
#endif
- SIMIX_req_process_change_host(process,
now->name, host->name
);
+ SIMIX_req_process_change_host(process,
host->simdata->smx_host
);
return MSG_OK;
}
return MSG_OK;
}
@@
-235,7
+233,7
@@
MSG_error_t MSG_process_change_host(m_host_t host)
*/
void* MSG_process_get_data(m_process_t process)
{
*/
void* MSG_process_get_data(m_process_t process)
{
- xbt_assert
0
(process != NULL, "Invalid parameter");
+ xbt_assert(process != NULL, "Invalid parameter");
/* get from SIMIX the MSG process data, and then the user data */
simdata_process_t simdata = SIMIX_req_process_get_data(process);
/* get from SIMIX the MSG process data, and then the user data */
simdata_process_t simdata = SIMIX_req_process_get_data(process);
@@
-250,7
+248,7
@@
void* MSG_process_get_data(m_process_t process)
*/
MSG_error_t MSG_process_set_data(m_process_t process, void *data)
{
*/
MSG_error_t MSG_process_set_data(m_process_t process, void *data)
{
- xbt_assert
0
(process != NULL, "Invalid parameter");
+ xbt_assert(process != NULL, "Invalid parameter");
simdata_process_t simdata = SIMIX_req_process_get_data(process);
simdata->data = data;
simdata_process_t simdata = SIMIX_req_process_get_data(process);
simdata->data = data;
@@
-267,7
+265,7
@@
MSG_error_t MSG_process_set_data(m_process_t process, void *data)
*/
m_host_t MSG_process_get_host(m_process_t process)
{
*/
m_host_t MSG_process_get_host(m_process_t process)
{
- xbt_assert
0
(process != NULL, "Invalid parameter");
+ xbt_assert(process != NULL, "Invalid parameter");
simdata_process_t simdata = SIMIX_req_process_get_data(process);
return simdata->m_host;
simdata_process_t simdata = SIMIX_req_process_get_data(process);
return simdata->m_host;
@@
-316,7
+314,7
@@
int MSG_process_get_PID(m_process_t process)
*/
int MSG_process_get_PPID(m_process_t process)
{
*/
int MSG_process_get_PPID(m_process_t process)
{
- xbt_assert
0
(process != NULL, "Invalid parameter");
+ xbt_assert(process != NULL, "Invalid parameter");
simdata_process_t simdata = SIMIX_req_process_get_data(process);
simdata_process_t simdata = SIMIX_req_process_get_data(process);
@@
-331,7
+329,7
@@
int MSG_process_get_PPID(m_process_t process)
*/
const char *MSG_process_get_name(m_process_t process)
{
*/
const char *MSG_process_get_name(m_process_t process)
{
- xbt_assert
0
(process, "Invalid parameter");
+ xbt_assert(process, "Invalid parameter");
return SIMIX_req_process_get_name(process);
}
return SIMIX_req_process_get_name(process);
}
@@
-356,7
+354,7
@@
const char *MSG_process_get_property_value(m_process_t process,
*/
xbt_dict_t MSG_process_get_properties(m_process_t process)
{
*/
xbt_dict_t MSG_process_get_properties(m_process_t process)
{
- xbt_assert
0
(process != NULL, "Invalid parameter");
+ xbt_assert(process != NULL, "Invalid parameter");
return SIMIX_req_process_get_properties(process);
return SIMIX_req_process_get_properties(process);
@@
-401,7
+399,7
@@
m_process_t MSG_process_self(void)
*/
MSG_error_t MSG_process_suspend(m_process_t process)
{
*/
MSG_error_t MSG_process_suspend(m_process_t process)
{
- xbt_assert
0
(process != NULL, "Invalid parameter");
+ xbt_assert(process != NULL, "Invalid parameter");
CHECK_HOST();
#ifdef HAVE_TRACING
CHECK_HOST();
#ifdef HAVE_TRACING
@@
-420,7
+418,7
@@
MSG_error_t MSG_process_suspend(m_process_t process)
*/
MSG_error_t MSG_process_resume(m_process_t process)
{
*/
MSG_error_t MSG_process_resume(m_process_t process)
{
- xbt_assert
0
(process != NULL, "Invalid parameter");
+ xbt_assert(process != NULL, "Invalid parameter");
CHECK_HOST();
#ifdef HAVE_TRACING
CHECK_HOST();
#ifdef HAVE_TRACING
@@
-439,7
+437,7
@@
MSG_error_t MSG_process_resume(m_process_t process)
*/
int MSG_process_is_suspended(m_process_t process)
{
*/
int MSG_process_is_suspended(m_process_t process)
{
- xbt_assert
0
(process != NULL, "Invalid parameter");
+ xbt_assert(process != NULL, "Invalid parameter");
return SIMIX_req_process_is_suspended(process);
}
return SIMIX_req_process_is_suspended(process);
}