Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Keep in sync with last changes in the GRAS callback API
[simgrid.git] / src / amok / base.c
1 /* $Id$ */
2
3 /* base - several addons to do specific stuff not in GRAS itself            */
4
5 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved.            */
6
7 /* This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. */
9
10 #include "gras.h"
11 #include "amok/base.h"
12
13 XBT_LOG_NEW_SUBCATEGORY(amok,XBT_LOG_ROOT_CAT,"All AMOK categories");
14
15 void amok_base_init(void) {
16   gras_datadesc_type_t host_desc, remoterr_desc;
17      
18   /* Build the datatype descriptions */
19   host_desc = gras_datadesc_struct("xbt_host_t");
20   gras_datadesc_struct_append(host_desc,"name",gras_datadesc_by_name("string"));
21   gras_datadesc_struct_append(host_desc,"exp_size",gras_datadesc_by_name("int"));
22   gras_datadesc_struct_close(host_desc);
23   host_desc = gras_datadesc_ref("xbt_host_t*",host_desc);
24    
25   remoterr_desc = gras_datadesc_struct("s_amok_remoterr_t");
26   gras_datadesc_struct_append(remoterr_desc,"msg",gras_datadesc_by_name("string"));
27   gras_datadesc_struct_append(remoterr_desc,"code",gras_datadesc_by_name("unsigned int"));
28   gras_datadesc_struct_close(remoterr_desc);
29   remoterr_desc = gras_datadesc_ref("amok_remoterr_t",remoterr_desc);
30 }
31
32 void amok_base_exit(void) {
33    /* No real module mechanism in GRAS so far, nothing to do. */
34 }
35