timers: Fix identifier name in wait's spin-lock

Also resolves implicit definition warnings for wait by including the necessary header where applicable
This commit is contained in:
Lioncash 2018-02-23 17:34:30 -05:00
parent dbf2eb7ed1
commit 7eaac5b706
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,8 @@
#include <stdint.h> #include <stdint.h>
#include "cpu_context.h" #include "cpu_context.h"
#include "utils.h"
#include "pmc.h" #include "pmc.h"
#include "timers.h"
#include "utils.h"
saved_cpu_context_t g_cpu_contexts[NUM_CPU_CORES] = {0}; saved_cpu_context_t g_cpu_contexts[NUM_CPU_CORES] = {0};

View File

@ -2,7 +2,7 @@
void wait(uint32_t microseconds) { void wait(uint32_t microseconds) {
uint32_t old_time = TIMERUS_CNTR_1US_0; 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. */ /* Spin-lock. */
} }
} }