Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try a bit harder to get the simulated time without any function call
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Dec 2010 09:20:58 +0000 (09:20 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Dec 2010 09:20:58 +0000 (09:20 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9023 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/msg/msg.h
include/simix/simix.h
src/include/surf/surf.h
src/msg/global.c
src/surf/surf.c

index 56b15b3..2805298 100644 (file)
@@ -31,7 +31,7 @@ XBT_PUBLIC(void) MSG_set_function(const char *host_id,
                                   const char *function_name,
                                   xbt_dynar_t arguments);
 
                                   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);
 
 
 XBT_PUBLIC(unsigned long int) MSG_get_sent_msg(void);
 
 
index 449aed0..0757da1 100644 (file)
@@ -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.    */
 /******************************************************************************/
 
 /* 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 */
 
 /******************************* Host Requests ********************************/
 /* FIXME: use handlers and keep smx_host_t hidden from higher levels */
index 541534b..baee26e 100644 (file)
@@ -634,7 +634,7 @@ XBT_PUBLIC(double) surf_solve(double max_date);
  *
  *  Return the current time in millisecond.
  */
  *
  *  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
 
 /** \brief Exit SURF
  *  \ingroup SURF_simulation
index eaf3e19..46f25b5 100644 (file)
@@ -220,7 +220,7 @@ MSG_error_t MSG_clean(void)
 /** \ingroup msg_easier_life
  * \brief A clock (in second).
  */
 /** \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();
 }
 {
   return SIMIX_get_clock();
 }
index 0644b8b..a37608e 100644 (file)
@@ -466,7 +466,7 @@ double surf_solve(double max_date)
   return min;
 }
 
   return min;
 }
 
-double surf_get_clock(void)
+XBT_INLINE double surf_get_clock(void)
 {
   return NOW;
 }
 {
   return NOW;
 }