diff options
author | Damjan Marion <damarion@cisco.com> | 2018-09-03 12:30:36 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-09-03 16:51:40 +0000 |
commit | 4dffd1c9988020619caff9b8d3b350e7f79e0398 (patch) | |
tree | 58d6b48f3925e815b68dfe04d3946c80ad1c24a1 /src/vppinfra/timer.c | |
parent | ea5b5be4eeb0f4cd80cb466bd6e31cad33c57960 (diff) |
Compile vppinfra on macOS
Add missing calls to clib_mem_init to vppinfra test codes.
Change-Id: I53ffc6fc287d1a378065bb86c18b6e995ecdb775
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vppinfra/timer.c')
-rw-r--r-- | src/vppinfra/timer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vppinfra/timer.c b/src/vppinfra/timer.c index 85149dc6b00..8bbab653ec0 100644 --- a/src/vppinfra/timer.c +++ b/src/vppinfra/timer.c @@ -46,6 +46,10 @@ #include <vppinfra/timer.h> #include <vppinfra/error.h> +#ifndef HZ +#define HZ 1000 +#endif + typedef struct { f64 time; @@ -112,14 +116,14 @@ timer_interrupt (int signum) vector of pending timers. */ t = vec_end (timers) - 1; - ASSERT (now >= 0 && finite (now)); + ASSERT (now >= 0 && isfinite (now)); /* Time difference between when timer goes off and now. */ dt = t->time - now; /* If timer is within threshold of going off call user's callback. */ - if (dt <= time_resolution && finite (dt)) + if (dt <= time_resolution && isfinite (dt)) { _vec_len (timers) -= 1; (*t->func) (t->arg, -dt); |