X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7dbf5c66d75338dce60fd2242be656eaa7e4d2da..87116782db3154fb79cd353db446bd226cf15976:/src/msg/msg_task.c diff --git a/src/msg/msg_task.c b/src/msg/msg_task.c index 16a7fe59a1..74f25b0468 100644 --- a/src/msg/msg_task.c +++ b/src/msg/msg_task.c @@ -1,11 +1,11 @@ -/* Copyright (c) 2004-2014. The SimGrid Team. +/* Copyright (c) 2004-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "msg_private.h" -#include "simix/smx_private.h" +#include "src/simix/smx_private.h" #include "xbt/sysdep.h" #include "xbt/log.h" @@ -273,7 +273,7 @@ msg_error_t MSG_task_destroy(msg_task_t task) action = task->simdata->compute; if (action) - simcall_host_execution_destroy(action); + simcall_process_execution_destroy(action); /* parallel tasks only */ xbt_free(task->simdata->host_list); @@ -298,7 +298,7 @@ msg_error_t MSG_task_cancel(msg_task_t task) xbt_assert((task != NULL), "Cannot cancel a NULL task"); if (task->simdata->compute) { - simcall_host_execution_cancel(task->simdata->compute); + simcall_process_execution_cancel(task->simdata->compute); } else if (task->simdata->comm) { simdata_task_t simdata = task->simdata; @@ -319,7 +319,7 @@ msg_error_t MSG_task_cancel(msg_task_t task) double MSG_task_get_flops_amount(msg_task_t task) { if (task->simdata->compute) { - return simcall_host_execution_get_remains(task->simdata->compute); + return simcall_process_execution_get_remains(task->simdata->compute); } else { return task->simdata->flops_amount; } @@ -410,7 +410,7 @@ void MSG_task_set_priority(msg_task_t task, double priority) task->simdata->priority = 1 / priority; if (task->simdata->compute) - simcall_host_execution_set_priority(task->simdata->compute, + simcall_process_execution_set_priority(task->simdata->compute, task->simdata->priority); } @@ -431,7 +431,7 @@ void MSG_task_set_bound(msg_task_t task, double bound) task->simdata->bound = bound; if (task->simdata->compute) - simcall_host_execution_set_bound(task->simdata->compute, + simcall_process_execution_set_bound(task->simdata->compute, task->simdata->bound); } @@ -489,7 +489,7 @@ void MSG_task_set_affinity(msg_task_t task, msg_host_t host, unsigned long mask) xbt_dict_remove_ext(task->simdata->affinity_mask_db, (char *) host, sizeof(host)); } } else - xbt_dict_set_ext(task->simdata->affinity_mask_db, (char *) host, sizeof(host), (void *) mask, NULL); + xbt_dict_set_ext(task->simdata->affinity_mask_db, (char *) host, sizeof(host), (void *)(uintptr_t) mask, NULL); /* We set affinity data of this task. If the task is being executed, we * actually change the affinity setting of the task. Otherwise, this change @@ -513,10 +513,10 @@ void MSG_task_set_affinity(msg_task_t task, msg_host_t host, unsigned long mask) /* task is being executed on this host. so change the affinity now */ { /* check it works. remove me if it works. */ - xbt_assert((unsigned long) xbt_dict_get_or_null_ext(task->simdata->affinity_mask_db, (char *) host, sizeof(msg_host_t)) == mask); + xbt_assert((unsigned long)(uintptr_t) xbt_dict_get_or_null_ext(task->simdata->affinity_mask_db, (char *) host, sizeof(msg_host_t)) == mask); } XBT_INFO("set affinity(0x%04lx@%s) for %s", mask, MSG_host_get_name(host), MSG_task_get_name(task)); - simcall_host_execution_set_affinity(task->simdata->compute, host, mask); + simcall_process_execution_set_affinity(task->simdata->compute, host, mask); } }