Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update SD_init() and SD_exit()
[simgrid.git] / src / simdag / private.h
index ed79e69..9fef23b 100644 (file)
@@ -7,14 +7,22 @@
 #include "simdag/datatypes.h"
 #include "surf/surf.h"
 
-#define SD_CHECK_INIT_DONE() xbt_assert0(sd_global != NULL, "Call SD_init() first")
+#define SD_INITIALISED() (sd_global != NULL)
+#define SD_CHECK_INIT_DONE() xbt_assert0(SD_INITIALISED(), "Call SD_init() first")
 
 /* Global variables */
 
 typedef struct SD_global {
-  xbt_dict_t workstations; /* workstation list */
+  xbt_dict_t workstations; /* workstation dictionary */
   int workstation_count; /* number of workstations */
-  xbt_dict_t links; /* link list */
+  SD_workstation_t *workstation_list; /* array of workstations, created only if
+                                        necessary in SD_workstation_get_list */
+
+  xbt_dict_t links; /* links */
+  int link_count; /* number of links */
+  SD_link_t *link_list; /* array of links, created only if
+                          necessary in SD_link_get_list */
+
   int watch_point_reached; /* has a task just reached a watch point? */
   
   /* task state sets */
@@ -47,6 +55,10 @@ typedef struct SD_task {
   xbt_swag_t state_set;
   void *data; /* user data */
   char *name;
+  double amount;
+  double remains;
+  double start_time;
+  double finish_time;
   surf_action_t surf_action;
   unsigned short watch_points;
   int state_changed; /* used only by SD_simulate, to make sure we put