1
0
Fork 0
forked from len0rd/rockbox

Remove int_prio argument from timer_register, and move the only use for it into alpine_cdc plugin, since this plugin is only built on SH7034

Also remove it from TIMER_START()

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21558 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2009-06-29 14:29:46 +00:00
parent b955dff268
commit 89ccd5c145
25 changed files with 42 additions and 68 deletions

View file

@ -30,18 +30,6 @@ static int timer_prio = -1;
void SHAREDBSS_ATTR (*pfn_timer)(void) = NULL; /* timer callback */
void SHAREDBSS_ATTR (*pfn_unregister)(void) = NULL; /* unregister callback */
#ifndef __TIMER_SET
/* Define these if not defined by target to make the #else cases compile
* even if the target doesn't have them implemented. */
#define __TIMER_SET(cycles, set) false
#if NUM_CORES > 1
#define __TIMER_START(int_prio, core) false
#else
#define __TIMER_START(int_prio) false
#endif
#define __TIMER_STOP()
#endif
static bool timer_set(long cycles, bool start)
{
return __TIMER_SET(cycles, start);
@ -49,17 +37,12 @@ static bool timer_set(long cycles, bool start)
/* Register a user timer, called every <cycles> TIMER_FREQ cycles */
bool timer_register(int reg_prio, void (*unregister_callback)(void),
long cycles, int int_prio, void (*timer_callback)(void)
long cycles, void (*timer_callback)(void)
IF_COP(, int core))
{
if (reg_prio <= timer_prio || cycles == 0)
return false;
#if CONFIG_CPU == SH7034
if (int_prio < 1 || int_prio > 15)
return false;
#endif
if (!timer_set(cycles, true))
return false;
@ -68,18 +51,10 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void),
timer_prio = reg_prio;
#if NUM_CORES > 1
return __TIMER_START(int_prio, core);
return __TIMER_START(core);
#else
return __TIMER_START(int_prio);
return __TIMER_START();
#endif
/* Cover for targets that don't use all these */
(void)reg_prio;
(void)unregister_callback;
(void)cycles;
/* TODO: Implement for PortalPlayer and iFP (if possible) */
(void)int_prio;
(void)timer_callback;
}
bool timer_set_period(long cycles)