From: Samuel Lepetit Date: Tue, 12 Jun 2012 09:58:43 +0000 (+0200) Subject: Add resume/suspend. Make restart/pause deprecated X-Git-Tag: v3_9_90~569^2~19^2~54^2~12 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7a70dde587bf05977d0f9e1d854e98f192a79426?hp=d3e7225dadcad644d2f4d4492e05a4d8341af887 Add resume/suspend. Make restart/pause deprecated --- diff --git a/org/simgrid/msg/Process.java b/org/simgrid/msg/Process.java index dcfd43f3af..b726b8df69 100644 --- a/org/simgrid/msg/Process.java +++ b/org/simgrid/msg/Process.java @@ -230,16 +230,31 @@ public abstract class Process implements Runnable { /** * Suspends the process by suspending the task on which it was * waiting for the completion. - * */ - public native void pause(); + public native void suspend(); + /** + * Suspends the process by suspending the task on which it was + * waiting for the completion. + * DEPRECATED: use suspend instead. + */ + @Deprecated + public void pause() { + suspend(); + } /** * Resumes a suspended process by resuming the task on which it was * waiting for the completion. - * - * + * DEPRECATED: use resume instead. */ - public native void restart(); + @Deprecated + public void restart() { + resume(); + } + /** + * Resumes a suspended process by resuming the task on which it was + * waiting for the completion. + */ + public native void resume(); /** * Tests if a process is suspended. * diff --git a/src/jmsg_process.c b/src/jmsg_process.c index 49626af7c0..47de57ad8c 100644 --- a/src/jmsg_process.c +++ b/src/jmsg_process.c @@ -206,7 +206,7 @@ Java_org_simgrid_msg_Process_currentProcess(JNIEnv * env, jclass cls) } JNIEXPORT void JNICALL -Java_org_simgrid_msg_Process_pause(JNIEnv * env, +Java_org_simgrid_msg_Process_suspend(JNIEnv * env, jobject jprocess) { m_process_t process = jprocess_to_native_process(jprocess, env); @@ -224,7 +224,7 @@ Java_org_simgrid_msg_Process_pause(JNIEnv * env, } JNIEXPORT void JNICALL -Java_org_simgrid_msg_Process_restart(JNIEnv * env, +Java_org_simgrid_msg_Process_resume(JNIEnv * env, jobject jprocess) { m_process_t process = jprocess_to_native_process(jprocess, env); diff --git a/src/jmsg_process.h b/src/jmsg_process.h index 0df379606f..266f646487 100644 --- a/src/jmsg_process.h +++ b/src/jmsg_process.h @@ -179,18 +179,18 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_currentProcess (JNIEnv *, jclass); /* * Class org_simgrid_msg_Process - * Method pause + * Method suspend * Signature (Lorg/simgrid/msg/Process;)V */ JNIEXPORT void JNICALL -Java_org_simgrid_msg_Process_pause(JNIEnv * env, +Java_org_simgrid_msg_Process_suspend(JNIEnv * env, jobject jprocess); /* * Class org_simgrid_msg_Process - * Method restart + * Method resume * Signature (Lorg/simgrid/msg/Process;)V */ -JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_restart +JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_resume (JNIEnv *, jobject); /* * Class org_simgrid_msg_Process