From: mquinson Date: Tue, 7 Dec 2010 09:20:58 +0000 (+0000) Subject: try a bit harder to get the simulated time without any function call X-Git-Tag: v3.6_beta2~900 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/96e88da53587bca891dce3ddb7772eff544e96be try a bit harder to get the simulated time without any function call git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9023 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/msg/msg.h b/include/msg/msg.h index 56b15b3837..2805298547 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -31,7 +31,7 @@ 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_INLINE XBT_PUBLIC(double) MSG_get_clock(void); XBT_PUBLIC(unsigned long int) MSG_get_sent_msg(void); diff --git a/include/simix/simix.h b/include/simix/simix.h index 449aed0daa..0757da1a03 100644 --- a/include/simix/simix.h +++ b/include/simix/simix.h @@ -87,7 +87,7 @@ XBT_PUBLIC(void) SIMIX_comm_copy_buffer_callback(smx_action_t comm, size_t buff_ /* They cannot be called from maestro's context, and they are thread safe. */ /******************************************************************************/ -XBT_PUBLIC(double) SIMIX_get_clock(void); +XBT_INLINE XBT_PUBLIC(double) SIMIX_get_clock(void); /******************************* Host Requests ********************************/ /* FIXME: use handlers and keep smx_host_t hidden from higher levels */ diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 541534bf9c..baee26ed4c 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -634,7 +634,7 @@ XBT_PUBLIC(double) surf_solve(double max_date); * * Return the current time in millisecond. */ -XBT_PUBLIC(double) surf_get_clock(void); +XBT_INLINE XBT_PUBLIC(double) surf_get_clock(void); /** \brief Exit SURF * \ingroup SURF_simulation diff --git a/src/msg/global.c b/src/msg/global.c index eaf3e195a5..46f25b58a2 100644 --- a/src/msg/global.c +++ b/src/msg/global.c @@ -220,7 +220,7 @@ MSG_error_t MSG_clean(void) /** \ingroup msg_easier_life * \brief A clock (in second). */ -double MSG_get_clock(void) +XBT_INLINE double MSG_get_clock(void) { return SIMIX_get_clock(); } diff --git a/src/surf/surf.c b/src/surf/surf.c index 0644b8bcf0..a37608e20a 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -466,7 +466,7 @@ double surf_solve(double max_date) return min; } -double surf_get_clock(void) +XBT_INLINE double surf_get_clock(void) { return NOW; }