X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/092910cd23c789eb83b53efb69e85ae58ed3b1d0..dde42fbf6c2fbd6f713f871a54602cd5673e5902:/src/xbt/module.c?ds=sidebyside diff --git a/src/xbt/module.c b/src/xbt/module.c index f21cd23fde..d2a718853c 100644 --- a/src/xbt/module.c +++ b/src/xbt/module.c @@ -8,11 +8,22 @@ /* 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_private.h" +#include "xbt/sysdep.h" +#include "xbt/log.h" +#include "xbt/error.h" +#include "xbt/dynar.h" +#include "xbt/config.h" -GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(module,GRAS); +#include "gras/process.h" /* FIXME: bad loop */ -extern void gras_log_finalize(void); +#include "xbt/module.h" /* this module */ + +#include "xbt_modinter.h" /* prototype of other module's init/exit in XBT */ +#include "gras_modinter.h" /* same in GRAS */ + +GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(module,xbt, "module handling"); + +static int gras_running_process = 0; struct gras_module_ { gras_dynar_t *deps; @@ -22,38 +33,71 @@ struct gras_module_ { gras_module_finalize_fct_t finalize; }; +void +gras_init(int *argc, char **argv) { + gras_init_defaultlog(argc, argv, NULL); +} /** - * gras_init: + * gras_init_defaultlog: * @argc: * @argv: * * Initialize the gras mecanisms. */ void -gras_init(int argc,char **argv) { - int i; +gras_init_defaultlog(int *argc,char **argv, const char *defaultlog) { + int i,j; char *opt; gras_error_t errcode; + int found=0; INFO0("Initialize GRAS"); - for (i=1; i