Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use swags to handle task states and change structure s_SD_task_t.
[simgrid.git] / include / simdag / datatypes.h
index f7d3299..72eaa75 100644 (file)
@@ -7,11 +7,6 @@ typedef struct SD_link_data *SD_link_data_t;
 typedef struct SD_link {
   SD_link_data_t sd_data; /* SD internal data */
   void *data; /* user data */
-
-  /*char *name;*/
-  /*double capacity;*/
-  /*double current_bandwidth;
-    double current_latency;*/
 } s_SD_link_t, *SD_link_t;
 
 /* Workstation */
@@ -24,20 +19,14 @@ typedef struct SD_workstation {
 
 /* Task state */
 typedef enum {
-  SD_SCHEDULED,
-  SD_RUNNING,
-  SD_DONE,
-  SD_FAILED
-} SD_task_state_t;
+  SD_NOT_SCHEDULED = 0, /* 0 because SD_NOT_SCHEDULED is not a valid state for SD_watch and SD_unwatch */
+  SD_SCHEDULED =     0x0001,
+  SD_RUNNING =       0x0002,
+  SD_DONE =          0x0004,
+  SD_FAILED =        0x0008 
+} e_SD_task_state_t;
 
 /* Task */
-typedef struct SD_task {
-  void *data;
-  char *name;
-  /*double amount;
-    double remaining_amount;*/
-  SD_task_state_t state;
-  /* TODO: dependencies + watch */
-} s_SD_task_t, *SD_task_t;
+typedef struct SD_task *SD_task_t;
 
 #endif