git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Compile fixes for clang
[tpg/acess2.git]
/
Kernel
/
time.c
diff --git
a/Kernel/time.c
b/Kernel/time.c
index
9ddf26a
..
54ef08f
100644
(file)
--- a/
Kernel/time.c
+++ b/
Kernel/time.c
@@
-17,13
+17,12
@@
typedef struct sTimer {
} tTimer;
// === PROTOTYPES ===
} tTimer;
// === PROTOTYPES ===
-Sint64 now(void);
void Timer_CallTimers(void);
// === GLOBALS ===
void Timer_CallTimers(void);
// === GLOBALS ===
-
Uint64
giTicks = 0;
-
Sint64
giTimestamp = 0;
-
Uint64
giPartMiliseconds = 0;
+
volatile Uint64
giTicks = 0;
+
volatile Sint64
giTimestamp = 0;
+
volatile Uint64
giPartMiliseconds = 0;
tTimer gTimers[NUM_TIMERS]; // TODO: Replace by a ring-list timer
// === CODE ===
tTimer gTimers[NUM_TIMERS]; // TODO: Replace by a ring-list timer
// === CODE ===
@@
-86,7
+85,9
@@
void Time_RemoveTimer(int ID)
void Time_Delay(int Delay)
{
Sint64 dest = giTimestamp + Delay;
void Time_Delay(int Delay)
{
Sint64 dest = giTimestamp + Delay;
+ //Log("Time_Delay: dest = %lli", dest);
while(dest > giTimestamp) Threads_Yield();
while(dest > giTimestamp) Threads_Yield();
+ //Log("Time_Delay: giTimestamp = %lli", giTimestamp);
}
// === EXPORTS ===
}
// === EXPORTS ===
UCC
git Repository :: git.ucc.asn.au