X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dc3c3416c4cca30fef7c29422d45094687f59893..67d66b0cf79b9fc02c0450f254584693dbf21d3b:/src/bindings/java/jmsg_vm.h diff --git a/src/bindings/java/jmsg_vm.h b/src/bindings/java/jmsg_vm.h index b0146dea7c..a1636679a1 100644 --- a/src/bindings/java/jmsg_vm.h +++ b/src/bindings/java/jmsg_vm.h @@ -1,103 +1,53 @@ -/* Functions related to the MSG VM API. */ +/* Functions related to the Virtual Machines. */ -/* Copyright (c) 2012. The SimGrid Team. */ +/* Copyright (c) 2012-2021. The SimGrid Team. All rights reserved. */ /* 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. */ #ifndef MSG_VM_H #define MSG_VM_H +#include "simgrid/host.h" +#include "simgrid/vm.h" #include -#include "msg/msg.h" -void jvm_bind(JNIEnv *env, jobject jvm, msg_vm_t vm); -msg_vm_t jvm_get_native(JNIEnv *env, jobject jvm); +SG_BEGIN_DECL + +/* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */ +#ifndef JNIEXPORT +#define JNIEXPORT +#endif +#ifndef JNICALL +#define JNICALL +#endif +/* end of eclipse-mandated pimple */ + +void jvm_bind(JNIEnv* env, jobject jvm, sg_vm_t vm); +sg_vm_t jvm_get_native(JNIEnv* env, jobject jvm); + +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_nativeInit(JNIEnv* env, jclass cls); + +JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_VM_all(JNIEnv* env, jclass cls_arg); + +JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_VM_isCreated(JNIEnv* env, jobject jvm); +JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_VM_isRunning(JNIEnv* env, jobject jvm); +JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_VM_isMigrating(JNIEnv* env, jobject jvm); +JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_VM_isSuspended(JNIEnv* env, jobject jvm); + +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_setBound(JNIEnv* env, jobject jvm, jdouble bound); + +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_create(JNIEnv* env, jobject jvm, jobject jhost, jstring jname, + jint coreAmount, jint jramsize, jint dprate, jint mig_netspeed); +JNIEXPORT jobject JNICALL Java_org_simgrid_msg_VM_getVMByName(JNIEnv* env, jclass cls, jstring jname); +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_nativeFinalize(JNIEnv* env, jobject jvm); +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_start(JNIEnv* env, jobject jvm); +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_nativeMigration(JNIEnv* env, jobject jvm, jobject jhost); +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_suspend(JNIEnv* env, jobject jvm); +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_resume(JNIEnv* env, jobject jvm); +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_shutdown(JNIEnv* env, jobject jvm); +JNIEXPORT void JNICALL Java_org_simgrid_msg_VM_destroy(JNIEnv* env, jobject jvm); -/* - * Class org_simgrid_msg_VM - * Method nativeInit - * Signature ()V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_nativeInit(JNIEnv *env, jclass); -/** - * Class org_simgrid_msg_VM - * Method start - * Signature (I)V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_start(JNIEnv *env, jobject jvm, jobject jhost, jstring jname, jint jcoreamount); -/** - * Class org_simgrid_msg_VM - * Method destroy - * Signature ()V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_destroy(JNIEnv *env, jobject jvm); -/** - * Class org_simgrid_msg_VM - * Method isSuspended - * Signature ()B - */ -JNIEXPORT jboolean JNICALL -Java_org_simgrid_msg_VM_isSuspended(JNIEnv *env, jobject jvm); -/** - * Class org_simgrid_msg_VM - * Method isRunning - * Signature ()B - */ -JNIEXPORT jboolean JNICALL -Java_org_simgrid_msg_VM_isRunning(JNIEnv *env, jobject jvm); -/** - * Class org_simgrid_msg_VM - * Method bind - * Signature (Lorg/simgrid/msg/Process;)V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_bind(JNIEnv *env, jobject jvm, jobject jprocess); -/** - * Class org_simgrid_msg_VM - * Method unbind - * Signature (Lorg/simgrid/msg/Process;)V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_unbind(JNIEnv *env, jobject jvm, jobject jprocess); -/** - * Class org_simgrid_msg_VM - * Method migrate - * Signature (Lorg/simgrid/msg/Host;)V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_migrate(JNIEnv *env, jobject jvm, jobject jhost); -/** - * Class org_simgrid_msg_VM - * Method suspend - * Signature ()V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_suspend(JNIEnv *env, jobject jvm); -/** - * Class org_simgrid_msg_VM - * Method resume - * Signature ()V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_resume(JNIEnv *env, jobject jvm); -/** - * Class org_simgrid_msg_VM - * Method shutdown - * Signature ()V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_shutdown(JNIEnv *env, jobject jvm); -/** - * Class org_simgrid_msg_VM - * Method reboot - * Signature ()V - */ -JNIEXPORT void JNICALL -Java_org_simgrid_msg_VM_reboot(JNIEnv *env, jobject jvm); +SG_END_DECL #endif