X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2539fff313cbd67c45b8490f7961e45e358d9ba2..dd97404569cc6567988399bcdce1d89b8efef459:/src/gras/Virtu/virtu_interface.h diff --git a/src/gras/Virtu/virtu_interface.h b/src/gras/Virtu/virtu_interface.h index c0a2c1e52b..178a39b424 100644 --- a/src/gras/Virtu/virtu_interface.h +++ b/src/gras/Virtu/virtu_interface.h @@ -2,13 +2,12 @@ /* virtu[alization] - speciafic parts for each OS and for SG */ -/* module's public interface exported within GRAS, but not to end user. */ +/* module's public interface exported within GRAS, but not to end user. */ -/* Authors: Martin Quinson */ -/* Copyright (C) 2004 Martin Quinson. */ +/* Copyright (c) 2004 Martin Quinson. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it - under the terms of the license (GNU LGPL) which comes with this package. */ + * under the terms of the license (GNU LGPL) which comes with this package. */ #ifndef GRAS_VIRTU_INTERFACE_H #define GRAS_VIRTU_INTERFACE_H @@ -17,35 +16,16 @@ #include "xbt/log.h" #include "xbt/error.h" #include "xbt/dynar.h" +#include "xbt/dict.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); +/* declare a new process specific data + (used by gras__register to make sure that gras_process_init will create it) */ + +typedef void* (pvoid_f_void_t)(void); /* FIXME: find a better place for it */ + +void gras_procdata_add(const char *name, pvoid_f_void_t creator,void_f_pvoid_t destructor); +void *gras_libdata_get(const char *name); + #endif /* GRAS_VIRTU_INTERFACE_H */