diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2009-02-11 12:55:51 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2009-02-11 12:55:51 +0000 |
commit | 21f0c9a2829415f52b64cbdf965b01525e78f17a (patch) | |
tree | b5cb8021097722969f75784011c9f64f991c0c3d /apps/plugin.h | |
parent | 4cd7597172d916db9fc99bde4c03b669366f852a (diff) | |
download | rockbox-21f0c9a2829415f52b64cbdf965b01525e78f17a.tar.gz rockbox-21f0c9a2829415f52b64cbdf965b01525e78f17a.zip |
Make basic cache functions into calls, and get rid of CACHE_FUNCTION_WRAPPERS and CACHE_FUNCTIONS_AS_CALL macros. Rename flush/invalidate_icache to cpucache_flush/invalidate. They're inlined only if an implementation isn't provided by defining HAVE_CPUCACHE_FLUSH/INVALIDATE.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19971 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r-- | apps/plugin.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index 9ebf793d3f..715f2ec512 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -438,9 +438,9 @@ struct plugin_api { | |||
438 | void (*trigger_cpu_boost)(void); | 438 | void (*trigger_cpu_boost)(void); |
439 | void (*cancel_cpu_boost)(void); | 439 | void (*cancel_cpu_boost)(void); |
440 | #endif | 440 | #endif |
441 | #ifdef CACHE_FUNCTIONS_AS_CALL | 441 | #if NUM_CORES > 1 |
442 | void (*flush_icache)(void); | 442 | void (*cpucache_flush)(void); |
443 | void (*invalidate_icache)(void); | 443 | void (*cpucache_invalidate)(void); |
444 | #endif | 444 | #endif |
445 | bool (*timer_register)(int reg_prio, void (*unregister_callback)(void), | 445 | bool (*timer_register)(int reg_prio, void (*unregister_callback)(void), |
446 | long cycles, int int_prio, | 446 | long cycles, int int_prio, |
@@ -854,20 +854,5 @@ extern const struct plugin_api *rb; | |||
854 | enum plugin_status plugin_start(const void* parameter) | 854 | enum plugin_status plugin_start(const void* parameter) |
855 | NO_PROF_ATTR; | 855 | NO_PROF_ATTR; |
856 | 856 | ||
857 | #undef CACHE_FUNCTION_WRAPPERS | ||
858 | #ifdef CACHE_FUNCTIONS_AS_CALL | ||
859 | #define CACHE_FUNCTION_WRAPPERS \ | ||
860 | void flush_icache(void) \ | ||
861 | { \ | ||
862 | rb->flush_icache(); \ | ||
863 | } \ | ||
864 | void invalidate_icache(void) \ | ||
865 | { \ | ||
866 | rb->invalidate_icache(); \ | ||
867 | } | ||
868 | #else | ||
869 | #define CACHE_FUNCTION_WRAPPERS | ||
870 | #endif /* CACHE_FUNCTIONS_AS_CALL */ | ||
871 | |||
872 | #endif /* __PCTOOL__ */ | 857 | #endif /* __PCTOOL__ */ |
873 | #endif | 858 | #endif |