[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Revert "Make the monotonic{_coarse, }_get() functions mockable."



commit 72a1f0180dbbc0a96e128d940b53ebf0f1c570d7
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Jul 21 10:30:21 2016 +0200

    Revert "Make the monotonic{_coarse,}_get() functions mockable."
    
    This reverts commit 2999f0b33fec8e91ba8e4680d3f9d03b09fe9501.
---
 src/common/compat_time.c | 24 ++++++++++++------------
 src/common/compat_time.h |  4 ++--
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index 974cf32..b7d69cf 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -220,8 +220,8 @@ monotime_init_internal(void)
 /**
  * Set "out" to the most recent monotonic time value
  */
-MOCK_IMPL(void,
-monotime_get,(monotime_t *out))
+void
+monotime_get(monotime_t *out)
 {
   out->abstime_ = mach_absolute_time();
 }
@@ -251,16 +251,16 @@ monotime_init_internal(void)
   /* no action needed. */
 }
 
-MOCK_IMPL(void,
-monotime_get,(monotime_t *out))
+void
+monotime_get(monotime_t *out)
 {
   int r = clock_gettime(CLOCK_MONOTONIC, &out->ts_);
   tor_assert(r == 0);
 }
 
 #ifdef CLOCK_MONOTONIC_COARSE
-MOCK_IMPL(void,
-monotime_coarse_get,(monotime_coarse_t *out))
+void
+monotime_coarse_get(monotime_coarse_t *out)
 {
   int r = clock_gettime(CLOCK_MONOTONIC_COARSE, &out->ts_);
   tor_assert(r == 0);
@@ -316,8 +316,8 @@ monotime_init_internal(void)
   // FreeLibrary(h) ?
 }
 
-MOCK_IMPL(void,
-monotime_get,(monotime_t *out))
+void
+monotime_get(monotime_t *out)
 {
   if (BUG(monotime_initialized == 0)) {
     monotime_init();
@@ -337,8 +337,8 @@ monotime_get,(monotime_t *out))
   LeaveCriticalSection(&monotime_lock);
 }
 
-MOCK_IMPL(void,
-monotime_coarse_get,(monotime_coarse_t *out))
+void
+monotime_coarse_get(monotime_coarse_t *out)
 {
   if (GetTickCount64_fn) {
     out->tick_count_ = (int64_t)GetTickCount64_fn();
@@ -396,8 +396,8 @@ monotime_init_internal(void)
   tor_mutex_init(&monotime_lock);
 }
 
-MOCK_IMPL(void,
-monotime_get,(monotime_t *out))
+void
+monotime_get(monotime_t *out)
 {
   if (BUG(monotime_initialized == 0)) {
     monotime_init();
diff --git a/src/common/compat_time.h b/src/common/compat_time.h
index 206e5b6..8d61bc2 100644
--- a/src/common/compat_time.h
+++ b/src/common/compat_time.h
@@ -72,7 +72,7 @@ void monotime_init(void);
 /**
  * Set <b>out</b> to the current time.
  */
-MOCK_DECL(void, monotime_get, (monotime_t *out));
+void monotime_get(monotime_t *out);
 /**
  * Return the number of nanoseconds between <b>start</b> and <b>end</b>.
  */
@@ -102,7 +102,7 @@ uint64_t monotime_absolute_msec(void);
 /**
  * Set <b>out</b> to the current coarse time.
  */
-MOCK_DECL(void, monotime_coarse_get, (monotime_coarse_t *out));
+void monotime_coarse_get(monotime_coarse_t *out);
 uint64_t monotime_coarse_absolute_nsec(void);
 uint64_t monotime_coarse_absolute_usec(void);
 uint64_t monotime_coarse_absolute_msec(void);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits