From: Michel Pollet Date: Fri, 1 Jun 2012 22:14:11 +0000 (+0100) Subject: core: Cycle timer small fix X-Git-Tag: v1.0~109 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=aa836a6d1ad6d85611c99590050396f923c9c275;p=sx%2Fsimavr.git core: Cycle timer small fix Makes it better on threaded GL on OSX Signed-off-by: Michel Pollet --- diff --git a/simavr/sim/sim_cycle_timers.c b/simavr/sim/sim_cycle_timers.c index 5b362e9..71ab161 100644 --- a/simavr/sim/sim_cycle_timers.c +++ b/simavr/sim/sim_cycle_timers.c @@ -68,11 +68,11 @@ avr_cycle_timer_insert( if (cnt) memmove(&pool->timer[inserti + 1], &pool->timer[inserti], cnt * sizeof(avr_cycle_timer_slot_t)); - pool->count++; pool->timer[inserti].timer = timer; pool->timer[inserti].param = param; pool->timer[inserti].when = when; + pool->count++; DEBUG(printf("%s %2d/%2d when %7d %p/%p\n", __func__, inserti, pool->count, (int)(when - avr->cycle), timer, param);) DUMP(pool, "after"); }