Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'hypervisor' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid into hypervisor
[simgrid.git] / src / surf / workstation_private.h
index 89f16a4..f786f4f 100644 (file)
@@ -1,28 +1,39 @@
-/*     $Id$ */
-
-/* Copyright (c) 2004 Arnaud Legrand. All rights reserved.                  */
+/* Copyright (c) 2009, 2013. 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. */
 
-#ifndef _SURF_WORKSTATION_PRIVATE_H
-#define _SURF_WORKSTATION_PRIVATE_H
+#ifndef WS_PRIVATE_H_
+#define WS_PRIVATE_H_
+typedef struct workstation_CLM03 {
+  s_surf_resource_t generic_resource;   /* Must remain first to add this to a trace */
+  void *net_elm;
+  xbt_dynar_t storage;
 
-#include "surf_private.h"
+  /* common with vm */
+  s_ws_params_t params;
 
-typedef struct workstation_CLM03 {
-  surf_model_t model;  /* Any such object, added in a trace
-                                  should start by this field!!! */
-  char *name;
-  void *cpu;
-  void *network_card;
 } s_workstation_CLM03_t, *workstation_CLM03_t;
 
-typedef struct surf_action_parallel_task_CSL05 {
-  s_surf_action_t generic_action;
-  lmm_variable_t variable;
-  double rate;
-  int suspended;
-} s_surf_action_parallel_task_CSL05_t, *surf_action_parallel_task_CSL05_t;
+int ws_action_unref(surf_action_t action);
+
+int ws_resource_used(void *resource_id);
+double ws_share_resources(surf_model_t workstation_model, double now);
+void ws_update_actions_state(surf_model_t workstation_model, double now, double delta);
+void ws_update_resource_state(void *id, tmgr_trace_event_t event_type, double value, double date);
+void ws_finalize(surf_model_t workstation_model);
+
+void ws_action_set_priority(surf_action_t action, double priority);
+
+surf_action_t ws_execute(void *workstation, double size);
+surf_action_t ws_action_sleep(void *workstation, double duration);
+void ws_action_suspend(surf_action_t action);
+void ws_action_resume(surf_action_t action);
+void ws_action_cancel(surf_action_t action);
+e_surf_resource_state_t ws_get_state(void *workstation);
+double ws_action_get_remains(surf_action_t action);
 
-#endif                         /* _SURF_WORKSTATION_PRIVATE_H */
+void ws_get_params(void *ws, ws_params_t params);
+void ws_set_params(void *ws, ws_params_t params);
+#endif /* WS_PRIVATE_H_ */