From: coldpeace Date: Wed, 21 Jul 2010 09:27:33 +0000 (+0000) Subject: add MSG_set_function function, used to bypass the deployment file X-Git-Tag: v3_5~782 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8bca872ed1a62f660c0d5da333eece9edb1d05a4?ds=sidebyside add MSG_set_function function, used to bypass the deployment file git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8038 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/msg/msg.h b/include/msg/msg.h index 18c749fc5f..47272b3ca4 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -26,6 +26,8 @@ XBT_PUBLIC(void) MSG_function_register(const char *name, XBT_PUBLIC(void) MSG_function_register_default(xbt_main_func_t code); XBT_PUBLIC(xbt_main_func_t) MSG_get_registered_function(const char *name); XBT_PUBLIC(void) MSG_launch_application(const char *file); +/*Bypass the parser */ +XBT_PUBLIC(void) MSG_set_function(const char* host_id,const char *function_name,xbt_dynar_t arguments); XBT_PUBLIC(double) MSG_get_clock(void); XBT_PUBLIC(unsigned long int) MSG_get_sent_msg(void); diff --git a/src/msg/deployment.c b/src/msg/deployment.c index 9d662f2916..01b9c9eec4 100644 --- a/src/msg/deployment.c +++ b/src/msg/deployment.c @@ -71,3 +71,12 @@ xbt_main_func_t MSG_get_registered_function(const char *name) { return SIMIX_get_registered_function(name); } + +/** + * \brief register functions bypassing the parser + */ + +void MSG_set_function(const char* host_id,const char *function_name,xbt_dynar_t arguments) +{ + SIMIX_process_set_function(host_id,function_name,arguments,-1,-1); +}