X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f06041cf2c450457a0b47a49b66b19cb9133c18e..ae7fb8c4744e6ada32f137582bac20dc358d6bcd:/src/simdag/private.h diff --git a/src/simdag/private.h b/src/simdag/private.h index 67e9e7beab..8549aea672 100644 --- a/src/simdag/private.h +++ b/src/simdag/private.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2014. The SimGrid Team. +/* Copyright (c) 2006-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -16,6 +16,8 @@ #include "xbt/mallocator.h" #include +SG_BEGIN_DECL() + /* Global variables */ typedef struct SD_global { @@ -47,13 +49,6 @@ typedef struct SD_global { extern SD_global_t sd_global; -/* Link */ -typedef struct SD_link { - void *surf_link; /* surf object */ - void *data; /* user data */ - e_SD_link_sharing_policy_t sharing_policy; -} s_SD_link_t; - /* Workstation */ typedef s_xbt_dictelm_t s_SD_workstation_t; typedef struct SD_workstation { @@ -64,10 +59,6 @@ typedef struct SD_workstation { SD_task_t current_task; /* only used in sequential mode */ } 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); -} - /* Storage */ typedef s_xbt_dictelm_t s_SD_storage_t; typedef struct SD_storage { @@ -76,7 +67,7 @@ typedef struct SD_storage { } s_SD_storage_priv_t, *SD_storage_priv_t; static inline SD_storage_priv_t SD_storage_priv(SD_storage_t storage){ - return xbt_lib_get_level(storage, SD_STORAGE_LEVEL); + return (SD_storage_priv_t)xbt_lib_get_level(storage, SD_STORAGE_LEVEL); } /* Task */ @@ -130,9 +121,6 @@ typedef struct SD_dependency { XBT_PUBLIC(xbt_swag_t) SD_simulate_swag(double how_long); /* could be public, but you need to see the internals of the SD_task_t to use it */ -SD_link_t __SD_link_create(void *surf_link, void *data); -#define __SD_link_destroy xbt_free_f - SD_workstation_t __SD_workstation_create(void *surf_workstation, void *data); void __SD_workstation_destroy(void *workstation); @@ -219,5 +207,6 @@ void TRACE_sd_task_execute_start(SD_task_t task); void TRACE_sd_task_execute_end(SD_task_t task); void TRACE_sd_task_destroy(SD_task_t task); +SG_END_DECL() #endif