From 34d8a859abc4fccdcc2313cc3481410cf5c2d27d Mon Sep 17 00:00:00 2001 From: Mat M Date: Fri, 23 Feb 2018 19:09:34 -0500 Subject: [PATCH] timers: Fix identifier name in wait's spin-lock (#45) Also resolves implicit definition warnings for wait by including the necessary header where applicable --- exosphere/cpu_context.c | 3 ++- exosphere/timers.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exosphere/cpu_context.c b/exosphere/cpu_context.c index 2dcd343fa..b80d26c58 100644 --- a/exosphere/cpu_context.c +++ b/exosphere/cpu_context.c @@ -1,7 +1,8 @@ #include #include "cpu_context.h" -#include "utils.h" #include "pmc.h" +#include "timers.h" +#include "utils.h" saved_cpu_context_t g_cpu_contexts[NUM_CPU_CORES] = {0}; diff --git a/exosphere/timers.c b/exosphere/timers.c index 051f6b7fe..b339a401f 100644 --- a/exosphere/timers.c +++ b/exosphere/timers.c @@ -2,7 +2,7 @@ void wait(uint32_t microseconds) { uint32_t old_time = TIMERUS_CNTR_1US_0; - while (TIMERUS_CNTR_1US_0 - old_time <= result) { + while (TIMERUS_CNTR_1US_0 - old_time <= microseconds) { /* Spin-lock. */ } } \ No newline at end of file