diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-10-27 17:18:01 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-10-27 17:18:01 +0000 |
commit | 623cd1cb0dcb78b2dfc92e50de34b1d72737c3d8 (patch) | |
tree | de354652f4593a83ab5c949970e4d7943eb92c4a /uisimulator/sdl | |
parent | a9e69d935cb5c2e5ffca1bbc977252ce7661d343 (diff) |
Fix red-- it should.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18894 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl')
-rw-r--r-- | uisimulator/sdl/kernel-sdl.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/uisimulator/sdl/kernel-sdl.c b/uisimulator/sdl/kernel-sdl.c index 3a1d82bf24..2ff18b33ee 100644 --- a/uisimulator/sdl/kernel-sdl.c +++ b/uisimulator/sdl/kernel-sdl.c @@ -42,8 +42,6 @@ static int interrupt_level = HIGHEST_IRQ_LEVEL; static int handlers_pending = 0; static int status_reg = 0; -extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void); - /* Nescessary logic: * 1) All threads must pass unblocked * 2) Current handler must always pass unblocked @@ -129,26 +127,16 @@ Uint32 tick_timer(Uint32 interval, void *param) if(new_tick != current_tick) { - long t; - for(t = new_tick - current_tick; t > 0; t--) + while(current_tick < new_tick) { - int i; - sim_enter_irq_handler(); - /* Run through the list of tick tasks */ - for(i = 0;i < MAX_NUM_TICK_TASKS;i++) - { - if(tick_funcs[i]) - { - tick_funcs[i](); - } - } + /* Run through the list of tick tasks - increments tick + * on each iteration. */ + call_tick_tasks(); sim_exit_irq_handler(); } - - current_tick = new_tick; } return 1; |