int level);
XBT_PUBLIC(xbt_dictelm_t) xbt_lib_get_elm_or_null(xbt_lib_t lib, const char *key);
XBT_PUBLIC(void *) xbt_lib_get_level(xbt_dictelm_t elm, int level);
+XBT_PUBLIC(void) xbt_lib_remove(xbt_lib_t lib, const char *key);
#define xbt_lib_length(lib) xbt_dict_length((lib)->dict)
/** @brief Destroy a msg_vm_t.
* @ingroup msg_VMs
*/
-void MSG_vm_destroy(msg_vm_t vm) {
+void MSG_vm_destroy(msg_vm_t vm)
+{
+ simcall_vm_destroy(vm);
+
+#if 0
unsigned int cpt;
msg_process_t process;
xbt_dynar_foreach(vm->processes,cpt,process) {
xbt_dynar_free(&vm->processes);
xbt_free(vm);
+#endif
}
simcall_BODY_set_vm_state(vm, msg_vm_state_running);
}
+void simcall_vm_destroy(smx_host_t vm)
+{
+ return simcall_BODY_vm_destroy(vm);
+}
+
/**
* \ingroup simix_process_management
* \brief Creates and runs a new SIMIX process.
xbt_free(workstation->generic_resource.name);
/* not defined yet, but we should have */
- // xbt_lib_unset(host_lib, name, SURF_WKS_LEVEL);
+ /* this will call surf_resource_free() */
+ xbt_lib_unset(host_lib, name, SURF_WKS_LEVEL);
xbt_free(workstation);
}
void **elts = elm->content;
return elts ? elts[level] : NULL;
}
+
+void xbt_lib_remove(xbt_lib_t lib, const char *key){
+ xbt_dict_remove(lib->dict, key);
+}