SimGrid (3.12) NOT RELEASED; urgency=low
+ cMSG:
+ * Interface improvement:
+ - Rename MSG_host_is_avail(h) to MSG_host_is_on(h)
+ jMSG:
+ * Interface improvement:
+ - Rename Host.isAvail() to Host.isOn()
SIMIX:
* New functions
- SIMIX_process_throw: raises an exception in a remote process
XBT_PUBLIC(double) MSG_get_host_speed(msg_host_t h);
XBT_PUBLIC(int) MSG_host_get_core_number(msg_host_t h);
XBT_PUBLIC(xbt_swag_t) MSG_host_get_process_list(msg_host_t h);
-XBT_PUBLIC(int) MSG_host_is_avail(msg_host_t h);
+XBT_PUBLIC(int) MSG_host_is_on(msg_host_t h);
+XBT_PUBLIC(int) MSG_host_is_off(msg_host_t h);
XBT_PUBLIC(void) __MSG_host_priv_free(msg_host_priv_t priv);
XBT_PUBLIC(void) __MSG_host_destroy(msg_host_t host);
/* these are the functions which are deprecated. Do not use them, they may get removed in future releases */
XBT_PUBLIC(msg_host_t *) MSG_get_host_table(void);
+#define MSG_host_is_avail(h) MSG_host_is_on(h)
+
#define MSG_TIMEOUT_FAILURE MSG_TIMEOUT
#define MSG_TASK_CANCELLED MSG_TASK_CANCELED
#define MSG_mailbox_put_with_time_out(mailbox, task, timeout) \
}
JNIEXPORT jboolean JNICALL
-Java_org_simgrid_msg_Host_isAvail(JNIEnv * env, jobject jhost) {
+Java_org_simgrid_msg_Host_isOn(JNIEnv * env, jobject jhost) {
msg_host_t host = jhost_get_native(env, jhost);
if (!host) {
return 0;
}
- return (jboolean) MSG_host_is_avail(host);
+ return (jboolean) MSG_host_is_on(host);
}
JNIEXPORT jobjectArray JNICALL
Java_org_simgrid_msg_Host_setProperty(JNIEnv *env, jobject jhost, jobject jname, jobject jvalue);
/*
* Class org_simgrid_msg_Host
- * Method isAvail
+ * Method isOn
* Signature ()Z
*/
-JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Host_isAvail
+JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Host_isOn
(JNIEnv *, jobject);
*/
public native void setProperty(String name, String value);
- /** This method tests if a host is available.
- * @return True if the host is available.
- */
- public native boolean isAvail();
+ /** This method tests if a host is up and running.
+ * @return True if the host is available.
+ */
+ public native boolean isOn();
/** This methods returns the list of mount point names on an host
* @return An array containing all mounted storages on the host
/**
* @param value The new bandwidth
+ * @param date When to change the bandwidth
*/
public void updateBandwidth(double value) {
SurfJNI.NetworkLink_updateBandwidth__SWIG_1(swigCPtr, this, value);
/**
* @param value The new latency
+ * @param date When to change the latency
*/
public void updateLatency(double value) {
SurfJNI.NetworkLink_updateLatency__SWIG_1(swigCPtr, this, value);
}
-/** \ingroup msg_gos_functions
- * \brief Determine if a host is available.
+/** @ingroup msg_gos_functions
+ * @brief Determine if a host is up and running.
*
- * \param host host to test
- * \return Returns 1 if host is available, 0 otherwise
+ * @param host host to test
+ * @return Returns true if the host is up and running, and false if it's currently down
*/
-int MSG_host_is_avail(msg_host_t host)
+int MSG_host_is_on(msg_host_t host)
{
xbt_assert((host != NULL), "Invalid parameters (host is NULL)");
return (simcall_host_get_state(host));
}
+/** @ingroup msg_gos_functions
+ * @brief Determine if a host is currently off.
+ */
+int MSG_host_is_off(msg_host_t host)
+{
+ xbt_assert((host != NULL), "Invalid parameters (host is NULL)");
+ return !(simcall_host_get_state(host));
+}
/** \ingroup m_host_management
* \brief Set the parameters of a given host