1 /* Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
11 #include "simgrid/platf_interface.h"
12 #include "surf/surf_private.h"
14 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse);
15 xbt_dynar_t surf_parse_host_cb_list = NULL; // of functions of type: surf_parsing_host_arg_t -> void
17 /** Module management function: creates all internal data structures */
18 void sg_platf_init(void) {
19 surf_parse_host_cb_list = xbt_dynar_new(sizeof(surf_parse_host_fct_t), NULL);
21 /** Module management function: frees all internal data structures */
22 void sg_platf_exit(void) {
23 xbt_dynar_free(&surf_parse_host_cb_list);
26 void surf_parse_host(surf_parsing_host_arg_t h){
27 unsigned int iterator;
28 surf_parse_host_fct_t fun;
29 xbt_dynar_foreach(surf_parse_host_cb_list, iterator, fun) {
33 void surf_parse_host_add_cb(surf_parse_host_fct_t fct) {
34 xbt_dynar_push(surf_parse_host_cb_list, &fct);