-void MSG_vm_bind(msg_vm_t vm, m_process_t process) {
- /* check if the process is already in a VM */
- simdata_process_t simdata = simcall_process_get_data(process);
- if (simdata->vm) {
- msg_vm_t old_vm = simdata->vm;
- int pos = xbt_dynar_search(old_vm->processes,&process);
- xbt_dynar_remove_at(old_vm->processes,pos, NULL);
- }
- /* check if the host is in the right host */
- if (simdata->m_host != vm->location) {
- MSG_process_migrate(process,vm->location);
- }
- simdata->vm = vm;
-
- XBT_DEBUG("binding Process %s to %p",MSG_process_get_name(process),vm);
-
- xbt_dynar_push_as(vm->processes,m_process_t,process);
+void MSG_vm_bind(msg_vm_t vm, msg_process_t process) {
+ /* check if the process is already in a VM */
+ simdata_process_t simdata = simcall_process_get_data(process);
+ if (simdata->vm) {
+ msg_vm_t old_vm = simdata->vm;
+ int pos = xbt_dynar_search(old_vm->processes,&process);
+ xbt_dynar_remove_at(old_vm->processes,pos, NULL);
+ }
+ /* check if the host is in the right host */
+ if (simdata->m_host != vm->location) {
+ MSG_process_migrate(process,vm->location);
+ }
+ simdata->vm = vm;
+
+ XBT_DEBUG("binding Process %s to %p",MSG_process_get_name(process),vm);
+
+ xbt_dynar_push_as(vm->processes,msg_process_t,process);