X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/806a8ef96de0bc6fbb75cadb0fbd8f3ef824d0b8..b1cea2b21e4a87c8fefbf5d44e9226ebe83ce37f:/src/gras/Virtu/virtu_interface.h diff --git a/src/gras/Virtu/virtu_interface.h b/src/gras/Virtu/virtu_interface.h index 2a5ebd86b0..e0a3fb16f5 100644 --- a/src/gras/Virtu/virtu_interface.h +++ b/src/gras/Virtu/virtu_interface.h @@ -12,39 +12,26 @@ #ifndef GRAS_VIRTU_INTERFACE_H #define GRAS_VIRTU_INTERFACE_H +#include "xbt/function_types.h" #include "xbt/sysdep.h" #include "xbt/log.h" -#include "xbt/error.h" -#include "xbt/dynar.h" +#include "xbt/set.h" #include "gras/virtu.h" #include "gras/process.h" -/** - * gras_process_data_t: - * - * Data for each process - */ -typedef struct { - /*queue of msgs storing the ones got while msg_wait'ing for something else */ - xbt_dynar_t msg_queue; /* elm type: gras_msg_t */ - - /* registered callbacks for each message */ - xbt_dynar_t cbl_list; /* elm type: gras_cblist_t */ - - /* SG only elements. In RL, they are part of the OS ;) */ - int chan; /* Formated messages channel */ - int rawChan; /* Unformated echange channel */ - xbt_dynar_t sockets; /* all sockets known to this process */ - - /* globals of the process */ - void *userdata; -} gras_procdata_t; - -/* Access */ -xbt_dynar_t gras_socketset_get(void); - -/* FIXME: mv to _private? */ -gras_procdata_t *gras_procdata_get(void); -void gras_procdata_init(void); -void gras_procdata_exit(void); +/* shutdown the module mechanism (world-wide cleanups) */ +XBT_PUBLIC(void) gras_moddata_exit(void); +/* shutdown this process wrt module mecanism (process-wide cleanups) */ +XBT_PUBLIC(void) gras_moddata_leave(void); + +/* This is the old interface (deprecated) */ + + +/* declare a new process specific data + (used by gras__register to make sure that gras_process_init will create it) */ +XBT_PUBLIC(int) gras_procdata_add(const char *name, pvoid_f_void_t creator,void_f_pvoid_t destructor); + +XBT_PUBLIC(void*) gras_libdata_by_name(const char *name); +XBT_PUBLIC(void*) gras_libdata_by_id(int id); + #endif /* GRAS_VIRTU_INTERFACE_H */