From 5b654b49c8603ff2f3fe7cfae9816cb585df0200 Mon Sep 17 00:00:00 2001 From: mquinson Date: Wed, 19 Jul 2006 14:16:15 +0000 Subject: [PATCH] gras_modules come into the dance, cleanup the GRAS+AMOK initialization schema git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2630 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/Makefile.am | 5 +++-- src/amok/amok_base.c | 24 ++++++++++++++++++++++++ src/amok/amok_modinter.h | 19 +++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 src/amok/amok_base.c create mode 100644 src/amok/amok_modinter.h diff --git a/src/Makefile.am b/src/Makefile.am index 880b55bb97..e9607990c7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -60,6 +60,7 @@ EXTRA_DIST= \ gras/DataDesc/ddt_parse.yy.l gras/DataDesc/ddt_parse.yy.c \ \ amok/Bandwidth/bandwidth_private.h + amok/amok_modinter.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/Virtu/process.c + gras/Virtu/process.c gras/Virtu/gras_module.c RL_SRC= \ gras/Transport/rl_transport.c \ @@ -182,7 +183,7 @@ SG_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 diff --git a/src/amok/amok_base.c b/src/amok/amok_base.c new file mode 100644 index 0000000000..44361c38c7 --- /dev/null +++ b/src/amok/amok_base.c @@ -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 index 0000000000..7267c78e40 --- /dev/null +++ b/src/amok/amok_modinter.h @@ -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 */ -- 2.20.1