From 4419f512157d207c7baa9a518f3abfdff07ebc76 Mon Sep 17 00:00:00 2001 From: coldpeace Date: Fri, 9 Jul 2010 08:32:58 +0000 Subject: [PATCH] add init_host_bypass to be used (by lua) to init cpu without using callback git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8001 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/surf/surfxml_parse.h | 3 +++ src/surf/surfxml_parse.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/include/surf/surfxml_parse.h b/include/surf/surfxml_parse.h index 1af0fd16d5..7ff7bfea4a 100644 --- a/include/surf/surfxml_parse.h +++ b/include/surf/surfxml_parse.h @@ -70,6 +70,9 @@ XBT_PUBLIC(int) surf_parse_get_debug(void); XBT_PUBLIC(void) surf_parse_set_debug(int bdebug); XBT_PUBLIC(int) surf_parse_lex_destroy(void); +/* init host and bypass the parser*/ +XBT_PUBLIC(void) init_host_bypass(char* name,double power); + /* What is needed to bypass the parser. */ XBT_PUBLIC_DATA(int_f_void_t) surf_parse; /* Entry-point to the parser. Set this to your function. */ diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 7ff2efa4c1..0ef9b6420c 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -269,6 +269,7 @@ void ETag_surfxml_platform(void) void STag_surfxml_host(void) { surfxml_call_cb_functions(STag_surfxml_host_cb_list); + } void ETag_surfxml_host(void) @@ -697,6 +698,7 @@ static void parse_sets(void) } static void parse_host_foreach(void){ + xbt_dynar_t names = NULL; unsigned int cpt = 0; char *name; @@ -1164,3 +1166,10 @@ static void add_randomness(void) random_std_deviation); xbt_dict_set(random_data_list, random_id, (void *) random, NULL); } + + +/* Init Host bypassing XML*/ +void init_host_bypass(char* name,double power) +{ + surf_cpu_im_init_bypass(name,power); +} -- 2.20.1