X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1298f825dbd95a3e38a6f0f0130fc1800670aeae..20f2291e7c83e26eebe9aeb61a91b76b5aed5a64:/src/simdag/private.h diff --git a/src/simdag/private.h b/src/simdag/private.h index cd16f944fd..e4025a39d3 100644 --- a/src/simdag/private.h +++ b/src/simdag/private.h @@ -56,14 +56,18 @@ typedef struct SD_link { } s_SD_link_t; /* Workstation */ +typedef s_xbt_dictelm_t s_SD_workstation_t; typedef struct SD_workstation { - void *surf_workstation; /* surf object */ void *data; /* user data */ e_SD_workstation_access_mode_t access_mode; xbt_fifo_t task_fifo; /* only used in sequential mode */ SD_task_t current_task; /* only used in sequential mode */ -} s_SD_workstation_t; +} s_SD_workstation_priv_t, *SD_workstation_priv_t; + +static inline SD_workstation_priv_t SD_workstation_priv(SD_workstation_t host){ + return xbt_lib_get_level(host, SD_HOST_LEVEL); +} /* Task */ typedef struct SD_task { @@ -75,7 +79,7 @@ typedef struct SD_task { char *name; int kind; double amount; - double alpha; /* used by typed parallel tasks */ + double alpha; /* used by typed parallel tasks */ double remains; double start_time; double finish_time; @@ -89,7 +93,7 @@ typedef struct SD_task { /* dependencies */ xbt_dynar_t tasks_before; xbt_dynar_t tasks_after; - unsigned int unsatisfied_dependencies; + int unsatisfied_dependencies; unsigned int is_not_ready; /* scheduling parameters (only exist in state SD_SCHEDULED) */