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
Rename Process.changeHost to process.migrate to match the MSG API
[simgrid.git]
/
src
/
jmsg.c
diff --git
a/src/jmsg.c
b/src/jmsg.c
index
85ba6f5
..
30b5c2a
100644
(file)
--- a/
src/jmsg.c
+++ b/
src/jmsg.c
@@
-280,9
+280,16
@@
Java_org_simgrid_msg_MsgNative_processSelf(JNIEnv * env, jclass cls)
}
JNIEXPORT void JNICALL
}
JNIEXPORT void JNICALL
-Java_org_simgrid_msg_MsgNative_process
ChangeHost
(JNIEnv * env, jclass cls,
- jobject jhost)
+Java_org_simgrid_msg_MsgNative_process
Migrate
(JNIEnv * env, jclass cls,
+ jobject j
process, jobject j
host)
{
{
+ m_process_t process = jprocess_to_native_process(jprocess, env);
+
+ if (!process) {
+ jxbt_throw_notbound(env, "process", jprocess);
+ return;
+ }
+
m_host_t host = jhost_get_native(env, jhost);
if (!host) {
m_host_t host = jhost_get_native(env, jhost);
if (!host) {
@@
-291,9
+298,8
@@
Java_org_simgrid_msg_MsgNative_processChangeHost(JNIEnv * env, jclass cls,
}
/* try to change the host of the process */
}
/* try to change the host of the process */
- MSG_error_t rv = MSG_process_change_host(host);
-
- jxbt_check_res("MSG_process_change_host()", rv, MSG_OK,
+ MSG_error_t rv = MSG_process_migrate(process, host);
+ jxbt_check_res("MSG_process_migrate()", rv, MSG_OK,
bprintf("unexpected error , please report this bug"));
}
bprintf("unexpected error , please report this bug"));
}