mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-17 17:36:44 +00:00
timers: Fix identifier name in wait's spin-lock (#45)
Also resolves implicit definition warnings for wait by including the necessary header where applicable
This commit is contained in:
parent
dbf2eb7ed1
commit
34d8a859ab
2 changed files with 3 additions and 2 deletions
|
@ -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};
|
||||||
|
|
||||||
|
|
|
@ -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. */
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue