summaryrefslogtreecommitdiff
path: root/uisimulator/sdl/kernel-sdl.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-10-27 17:18:01 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-10-27 17:18:01 +0000
commit623cd1cb0dcb78b2dfc92e50de34b1d72737c3d8 (patch)
treede354652f4593a83ab5c949970e4d7943eb92c4a /uisimulator/sdl/kernel-sdl.c
parenta9e69d935cb5c2e5ffca1bbc977252ce7661d343 (diff)
downloadrockbox-623cd1cb0dcb78b2dfc92e50de34b1d72737c3d8.tar.gz
rockbox-623cd1cb0dcb78b2dfc92e50de34b1d72737c3d8.zip
Fix red-- it should.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18894 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl/kernel-sdl.c')
-rw-r--r--uisimulator/sdl/kernel-sdl.c20
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;
42static int handlers_pending = 0; 42static int handlers_pending = 0;
43static int status_reg = 0; 43static int status_reg = 0;
44 44
45extern void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
46
47/* Nescessary logic: 45/* Nescessary logic:
48 * 1) All threads must pass unblocked 46 * 1) All threads must pass unblocked
49 * 2) Current handler must always pass unblocked 47 * 2) Current handler must always pass unblocked
@@ -129,26 +127,16 @@ Uint32 tick_timer(Uint32 interval, void *param)
129 127
130 if(new_tick != current_tick) 128 if(new_tick != current_tick)
131 { 129 {
132 long t; 130 while(current_tick < new_tick)
133 for(t = new_tick - current_tick; t > 0; t--)
134 { 131 {
135 int i;
136
137 sim_enter_irq_handler(); 132 sim_enter_irq_handler();
138 133
139 /* Run through the list of tick tasks */ 134 /* Run through the list of tick tasks - increments tick
140 for(i = 0;i < MAX_NUM_TICK_TASKS;i++) 135 * on each iteration. */
141 { 136 call_tick_tasks();
142 if(tick_funcs[i])
143 {
144 tick_funcs[i]();
145 }
146 }
147 137
148 sim_exit_irq_handler(); 138 sim_exit_irq_handler();
149 } 139 }
150
151 current_tick = new_tick;
152 } 140 }
153 141
154 return 1; 142 return 1;