X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1e32d1f72606b96bb1abd9af359f1590528ec843..806d1314d9398af51ffd016c95b39d173960c659:/include/gras/module.h diff --git a/include/gras/module.h b/include/gras/module.h index 0dfb6faea0..d318e49b9a 100644 --- a/include/gras/module.h +++ b/include/gras/module.h @@ -1,22 +1,29 @@ -/* $Id$ */ +/* Copyright (c) 2004, 2006, 2007, 2009, 2010. The SimGrid Team. + * All rights reserved. */ -/* module - modularize the code */ +/* 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. */ -/* Authors: Martin Quinson */ -/* Copyright (C) 2004 the Martin Quinson. */ -/* 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 GRAS_MODULE_H +#define GRAS_MODULE_H + +#include + +/* Function users of module should use */ +XBT_PUBLIC(void) gras_module_join(const char *name); +XBT_PUBLIC(void) gras_module_leave(const char *name); + + +/* Functions module implementor should use */ +XBT_PUBLIC(void) gras_module_add(const char *name, unsigned int data_size, + int *ID, void_f_void_t init_f, + void_f_void_t exit_f, + void_f_pvoid_t join_f, + void_f_pvoid_t leave_f); -#ifndef _GRAS_MODULE_H -#define _GRAS_MODULE_H -typedef struct gras_module_ gras_module_t; +XBT_PUBLIC(void *) gras_moddata_by_id(unsigned int ID); -typedef gras_module_t (*gras_module_new_fct_t)(int argc, char **argv); -typedef int (*gras_module_finalize_fct_t)(void); -void gras_init(int *argc,char **argv); -void gras_init_defaultlog(int *argc,char **argv, const char *defaultlog); -void gras_exit(void); -#endif /* _GRAS_MODULE_H */ +#endif /* GRAS_MODULE_H */