Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
typo in windows DLL cruft
[simgrid.git] / src / gras / Virtu / virtu_interface.h
index f15a714..e0a3fb1 100644 (file)
@@ -2,43 +2,36 @@
 
 /* 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
 
-/**
- * gras_process_data_t:
- *
- * Data for each process 
- */
-typedef struct {
-  /*queue of msgs storing the ones got while msg_wait'ing for something else */
-  gras_dynar_t *msg_queue; /* elm type: gras_msg_t */
-
-  /* registered callbacks for each message */
-  gras_dynar_t *cbl_list; /* elm type: gras_cblist_t */
-   
-
-  /* The channel we are listening to in SG for formated messages */
-  int chan;
-  gras_socket_t *sock; /* the corresponding socket (SG only) */
-   
-  /* The channel we are listening to in SG for raw send/recv */
-  int rawChan; 
-  gras_socket_t *rawSock;/* the corresponding socket (SG only) */
-
-  /* globals of the process */
-  void *userdata;               
-} gras_procdata_t;
-
-/* FIXME: mv to _private? */
-gras_procdata_t *gras_procdata_get(void);
-gras_error_t gras_procdata_init(void);
+#include "xbt/function_types.h"
+#include "xbt/sysdep.h"
+#include "xbt/log.h"
+#include "xbt/set.h"
+#include "gras/virtu.h"
+#include "gras/process.h"
+
+/* 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_<module>_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 */