X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ee7e9c2e455536ab817ae0136acfbb53822eecd..bea71eb0cdea9abd9b6476bdaaecd26179d58cd8:/src/gras/gras.c diff --git a/src/gras/gras.c b/src/gras/gras.c index 33adad5d44..c810ef1442 100644 --- a/src/gras/gras.c +++ b/src/gras/gras.c @@ -68,6 +68,10 @@ XBT_LOG_EXTERNAL_CATEGORY(gras_virtu); XBT_LOG_EXTERNAL_CATEGORY(gras_virtu_emul); XBT_LOG_EXTERNAL_CATEGORY(gras_virtu_process); +/** + * @ingroup GRAS_API + * \brief Initialize the gras mechanisms. + */ void gras_init(int *argc, char **argv) { int first = 0; @@ -143,13 +147,15 @@ void gras_init(int *argc, char **argv) pd->listener = gras_msg_listener_launch(msg_pd->msg_received); } +/** + * @ingroup GRAS_API + * @brief Finalize the gras mechanisms. + * */ void gras_exit(void) { - gras_procdata_t *pd; XBT_INFO("Exiting GRAS"); amok_exit(); gras_moddata_leave(); - pd = gras_procdata_get(); gras_msg_listener_shutdown(); gras_process_exit(); if (--gras_running_process == 0) { @@ -169,8 +175,7 @@ const char *hexa_str(unsigned char *data, int size, int downside) int begin, increment; if (buffsize < 5 * (size + 1)) { - if (buff) - free(buff); + free(buff); buffsize = 5 * (size + 1); buff = xbt_malloc(buffsize); }