summaryrefslogtreecommitdiff
path: root/firmware/export/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/kernel.h')
-rw-r--r--firmware/export/kernel.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/firmware/export/kernel.h b/firmware/export/kernel.h
index 9438f6d308..beba58eb21 100644
--- a/firmware/export/kernel.h
+++ b/firmware/export/kernel.h
@@ -191,8 +191,24 @@ struct wakeup
191/* We don't enable interrupts in the iPod bootloader, so we need to fake 191/* We don't enable interrupts in the iPod bootloader, so we need to fake
192 the current_tick variable */ 192 the current_tick variable */
193#define current_tick (signed)(USEC_TIMER/10000) 193#define current_tick (signed)(USEC_TIMER/10000)
194
195static inline void call_tick_tasks(void)
196{
197}
194#else 198#else
195extern volatile long current_tick; 199extern volatile long current_tick;
200
201/* inline helper for implementing target interrupt handler */
202static inline void call_tick_tasks(void)
203{
204 extern void (*tick_funcs[MAX_NUM_TICK_TASKS+1])(void);
205 int i;
206
207 current_tick++;
208
209 for (i = 0; tick_funcs[i] != NULL; i++)
210 tick_funcs[i]();
211}
196#endif 212#endif
197 213
198#ifdef SIMULATOR 214#ifdef SIMULATOR
@@ -207,18 +223,6 @@ int tick_add_task(void (*f)(void));
207int tick_remove_task(void (*f)(void)); 223int tick_remove_task(void (*f)(void));
208extern void tick_start(unsigned int interval_in_ms); 224extern void tick_start(unsigned int interval_in_ms);
209 225
210/* inline helper for implementing target interrupt handler */
211static inline void call_tick_tasks(void)
212{
213 extern void (*tick_funcs[MAX_NUM_TICK_TASKS+1])(void);
214 int i;
215
216 current_tick++;
217
218 for (i = 0; tick_funcs[i] != NULL; i++)
219 tick_funcs[i]();
220}
221
222struct timeout; 226struct timeout;
223 227
224/* timeout callback type 228/* timeout callback type