Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
implement gras_process_exit (using gras_procdata_exit) to plug the leaks
[simgrid.git] / src / gras / Virtu / rl_process.c
1 /* $Id$ */
2
3 /* process_rl - GRAS process handling on real life                         */
4
5 /* Authors: Martin Quinson                                                  */
6 /* Copyright (C) 2003,2004 da GRAS posse.                                   */
7
8 /* This program is free software; you can redistribute it and/or modify it
9    under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #include "Virtu/virtu_rl.h"
12
13 GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(process,GRAS);
14                               
15 /* globals */
16 static gras_procdata_t *_gras_procdata = NULL;
17
18 gras_error_t gras_process_init() {
19   gras_error_t errcode;
20
21   if (!(_gras_procdata=(gras_procdata_t *)malloc(sizeof(gras_procdata_t))))
22     RAISE_MALLOC;
23
24   TRY(gras_procdata_init());
25   return no_error;
26 }
27 gras_error_t gras_process_exit() {
28   gras_procdata_exit();
29   return no_error;
30 }
31
32 /* **************************************************************************
33  * Process data
34  * **************************************************************************/
35
36 gras_procdata_t *gras_procdata_get(void) {
37   gras_assert0(_gras_procdata,"Run gras_process_init!");
38
39   return _gras_procdata;
40 }