Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
gras_modules come into the dance, cleanup the GRAS+AMOK initialization schema
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Jul 2006 14:16:15 +0000 (14:16 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Jul 2006 14:16:15 +0000 (14:16 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2630 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/Makefile.am
src/amok/amok_base.c [new file with mode: 0644]
src/amok/amok_modinter.h [new file with mode: 0644]

index 880b55b..e960799 100644 (file)
@@ -60,6 +60,7 @@ EXTRA_DIST= \
        gras/DataDesc/ddt_parse.yy.l          gras/DataDesc/ddt_parse.yy.c \
        \
        amok/Bandwidth/bandwidth_private.h
        gras/DataDesc/ddt_parse.yy.l          gras/DataDesc/ddt_parse.yy.c \
        \
        amok/Bandwidth/bandwidth_private.h
+       amok/amok_modinter.h
 
 #        gras_private.h
 
 
 #        gras_private.h
 
@@ -142,7 +143,7 @@ COMMON_SRC=\
   gras/Msg/msg.c                      gras/Msg/rpc.c                       gras/Msg/timer.c                 \
   gras/Msg/msg_interface.h            gras/Msg/msg_private.h           \
   \
   gras/Msg/msg.c                      gras/Msg/rpc.c                       gras/Msg/timer.c                 \
   gras/Msg/msg_interface.h            gras/Msg/msg_private.h           \
   \
-  gras/Virtu/process.c
+  gras/Virtu/process.c gras/Virtu/gras_module.c
 
 RL_SRC= \
   gras/Transport/rl_transport.c          \
 
 RL_SRC= \
   gras/Transport/rl_transport.c          \
@@ -182,7 +183,7 @@ SG_SRC=  \
   gras/Msg/sg_msg.c
 
 AMOK_SRC= \
   gras/Msg/sg_msg.c
 
 AMOK_SRC= \
-  amok/base.c \
+  amok/amok_base.c \
   amok/Bandwidth/bandwidth.c amok/Bandwidth/saturate.c \
   amok/PeerManagement/peermanagement.c
 
   amok/Bandwidth/bandwidth.c amok/Bandwidth/saturate.c \
   amok/PeerManagement/peermanagement.c
 
diff --git a/src/amok/amok_base.c b/src/amok/amok_base.c
new file mode 100644 (file)
index 0000000..44361c3
--- /dev/null
@@ -0,0 +1,24 @@
+/* $Id$ */
+
+/* base - several addons to do specific stuff not in GRAS itself            */
+
+/* Copyright (c) 2003, 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. */
+
+#include "gras.h"
+#include "amok/amok_modinter.h"
+
+XBT_LOG_NEW_SUBCATEGORY(amok,XBT_LOG_ROOT_CAT,"All AMOK categories");
+
+void amok_init(void) {
+
+  /* Create all the modules */
+  amok_pm_modulecreate();
+}
+
+void amok_exit(void) {
+   /* FIXME: No real module mechanism in GRAS so far, nothing to do. */
+}
+
diff --git a/src/amok/amok_modinter.h b/src/amok/amok_modinter.h
new file mode 100644 (file)
index 0000000..7267c78
--- /dev/null
@@ -0,0 +1,19 @@
+/* $Id$ */
+
+/* amok modinter - interface to AMOK modules initialization and such        */
+
+/* Copyright (c) 2006 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. */
+
+#ifndef AMOK_BASE_H
+#define AMOK_BASE_H
+
+void amok_init(void);
+void amok_exit(void);
+
+/* module creation functions */
+void amok_pm_modulecreate(void);
+
+#endif /* AMOK_BASE_H */