Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Last bits of convertion from xbt_error_t to exceptions. Some more cleanups (mainly...
[simgrid.git] / src / msg / host.c
index a6cc623..17249ba 100644 (file)
@@ -5,9 +5,9 @@
 /* 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"private.h"
-#include"xbt/sysdep.h"
-#include "xbt/error.h"
+#include "private.h"
+#include "xbt/sysdep.h"
+#include "xbt/log.h"
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host, msg,
                                "Logging specific to MSG (host)");
 
@@ -175,3 +175,15 @@ int MSG_get_host_msgload(m_host_t h)
   return(0);
 /*   return(surf_workstation_resource->extension_public->get_load(h->simdata->host)); */
 }
+
+/** \ingroup m_host_management
+ * \brief Return the speed of the processor (in Mflop/s), regardless of 
+    the current load on the machine.
+ */
+double MSG_get_host_speed(m_host_t h)
+{
+  xbt_assert0((h!= NULL), "Invalid parameters");
+
+  return(surf_workstation_resource->
+        extension_public->get_speed(h->simdata->host,1.0));
+}