From: John Hodge Date: Sun, 4 Jul 2010 03:26:01 +0000 (+0800) Subject: Fixed potential coherency bug in timer code X-Git-Tag: rel0.06~125 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=76f88d3f8893523f4b79e37d01572e004d61fcf7;p=tpg%2Facess2.git Fixed potential coherency bug in timer code --- diff --git a/Kernel/time.c b/Kernel/time.c index c048d11a..30d11dcb 100644 --- a/Kernel/time.c +++ b/Kernel/time.c @@ -43,6 +43,7 @@ void Timer_CallTimers() { int i; void (*callback)(void *); + void *arg; for(i = 0; i < NUM_TIMERS; @@ -50,9 +51,9 @@ void Timer_CallTimers() { if(gTimers[i].Callback == NULL) continue; if(giTimestamp < gTimers[i].FiresAfter) continue; - callback = gTimers[i].Callback; + callback = gTimers[i].Callback; arg = gTimers[i].Argument; gTimers[i].Callback = NULL; - callback(gTimers[i].Argument); + callback(arg); } }