예제 #1
0
static void dump_platform_storages(void){
  unsigned int cursor;
  xbt_dynar_t storages = MSG_storages_as_dynar();
  msg_storage_t storage;
  xbt_dynar_foreach(storages, cursor, storage){
    XBT_INFO("Storage %s is attached to %s", MSG_storage_get_name(storage), MSG_storage_get_host(storage));
    MSG_storage_set_property_value(storage, "other usage", xbt_strdup("gpfs"));
  }
예제 #2
0
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getHost(JNIEnv * env,jobject jstorage) {
  msg_storage_t storage = jstorage_get_native(env, jstorage);

  if (!storage) {
    jxbt_throw_notbound(env, "storage", jstorage);
    return NULL;
  }
  const char *host_name = MSG_storage_get_host(storage);
  if (!host_name) {
    return NULL;
  }
  jobject jhost_name = env->NewStringUTF(host_name);

  return jhost_name;
}