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
change the way computation tracing is handled in smpi
[simgrid.git]
/
src
/
bindings
/
java
/
jmsg_vm.c
diff --git
a/src/bindings/java/jmsg_vm.c
b/src/bindings/java/jmsg_vm.c
index
7e98a81
..
5c54c1f
100644
(file)
--- a/
src/bindings/java/jmsg_vm.c
+++ b/
src/bindings/java/jmsg_vm.c
@@
-1,9
+1,10
@@
/* Functions related to the MSG VM API. */
/* Functions related to the MSG VM API. */
-/* Copyright (c) 2012. The SimGrid Team. */
+/* Copyright (c) 2012-2013. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/* This program is free software; you can redistribute it and/or modify it
-
* under the terms of the license (GNU LGPL) which comes with this package. */
+ * under the terms of the license (GNU LGPL) which comes with this package. */
#include "jmsg_vm.h"
#include "jmsg_host.h"
#include "jmsg_process.h"
#include "jmsg_vm.h"
#include "jmsg_host.h"
#include "jmsg_process.h"
@@
-11,12
+12,13
@@
#include "msg/msg.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
#include "msg/msg.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
+static jfieldID jvm_field_bind;
+
void jvm_bind(JNIEnv *env, jobject jvm, msg_vm_t vm) {
void jvm_bind(JNIEnv *env, jobject jvm, msg_vm_t vm) {
- (*env)->SetLongField(env, jvm, jvm_field_bind, (
jlong) (long) (vm)
);
+ (*env)->SetLongField(env, jvm, jvm_field_bind, (
intptr_t)vm
);
}
msg_vm_t jvm_get_native(JNIEnv *env, jobject jvm) {
}
msg_vm_t jvm_get_native(JNIEnv *env, jobject jvm) {
- msg_vm_t vm = (msg_vm_t)(*env)->GetLongField(env, jvm, jvm_field_bind);
- return vm;
+ return (msg_vm_t)(intptr_t)(*env)->GetLongField(env, jvm, jvm_field_bind);
}
JNIEXPORT void JNICALL
}
JNIEXPORT void JNICALL
@@
-61,8
+63,8
@@
Java_org_simgrid_msg_VM_bind(JNIEnv *env, jobject jvm, jobject jprocess) {
msg_vm_t vm = jvm_get_native(env,jvm);
msg_process_t process = jprocess_to_native_process(jprocess,env);
msg_vm_t vm = jvm_get_native(env,jvm);
msg_process_t process = jprocess_to_native_process(jprocess,env);
- xbt_assert((vm != NULL), "VM object is not b
inde
d");
- xbt_assert((process != NULL), "Process object is not b
inde
d.");
+ xbt_assert((vm != NULL), "VM object is not b
oun
d");
+ xbt_assert((process != NULL), "Process object is not b
oun
d.");
MSG_vm_bind(vm,process);
}
MSG_vm_bind(vm,process);
}