From: alebre Date: Thu, 31 Jan 2013 22:47:08 +0000 (+0100) Subject: Merge branch 'master' into hypervisor X-Git-Tag: v3_11_beta~297^2^2~113 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/01fc1d9e1180d76f5aa78180d54ef9f4088a2e90?hp=ce06185a3d18128e760608e10a5885793d56ac9b Merge branch 'master' into hypervisor --- diff --git a/include/msg/msg.h b/include/msg/msg.h index deec342424..daa38184aa 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -205,6 +205,9 @@ XBT_PUBLIC(msg_error_t) MSG_process_sleep(double nb_sec); XBT_PUBLIC(double) MSG_task_get_compute_duration(msg_task_t task); XBT_PUBLIC(void) MSG_task_set_compute_duration(msg_task_t task, double compute_duration); +XBT_PUBLIC(void) MSG_task_set_data_size(msg_task_t task, + double data_size); + XBT_PUBLIC(double) MSG_task_get_remaining_computation(msg_task_t task); XBT_PUBLIC(double) MSG_task_get_remaining_communication(msg_task_t task); XBT_PUBLIC(int) MSG_task_is_latency_bounded(msg_task_t task); diff --git a/src/msg/msg_task.c b/src/msg/msg_task.c index 101689c4d4..a32e0d81a5 100644 --- a/src/msg/msg_task.c +++ b/src/msg/msg_task.c @@ -342,6 +342,23 @@ void MSG_task_set_compute_duration(msg_task_t task, } +/** \ingroup m_task_management + * \brief set the amount data attached with a task #msg_task_t. + * + * \warning If the transfer is ongoing (already started and not finished), + * it is not modified by this call. + */ + +void MSG_task_set_data_size(msg_task_t task, + double data_size) +{ + xbt_assert(task, "Invalid parameter"); + task->simdata->message_size = data_size; + +} + + + /** \ingroup m_task_management * \brief Returns the remaining computation amount of a task #msg_task_t. *