summaryrefslogtreecommitdiffstats
path: root/firmware/thread.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-01-04 18:07:21 +0100
committerThomas Martitz <kugel@rockbox.org>2012-01-22 18:46:44 +0100
commit991ae1e39553172a7dd6cd8c634aebfce892e261 (patch)
tree672a4583af663def399c4fefdbad060605397fbc /firmware/thread.c
parenteaa83bd64775b87e943d345e2810deed44408776 (diff)
downloadrockbox-991ae1e39553172a7dd6cd8c634aebfce892e261.tar.gz
rockbox-991ae1e39553172a7dd6cd8c634aebfce892e261.zip
Create fimrware/asm directory for assembly optimized stuff.
This dir is suitable for stuff that doesn't fit the target tree, e.g. because it also builds on hosted or otherwise. It also has a generic subfolder for fallback C implementations so that not all archs need to provide asm files. SOURCES should only contain "foo.c" where foo.c includes the specific <arch>/foo.c files from the subdirs using the preprocessor. This way automatic selection of asm versions or generic C verion is possible. For the start, the thread support files are moved, since ASM threads can be used on hosted platforms as well. Since core_sleep() remains platform specific it's moved to the corresponding system.h headers. Change-Id: Iebff272f3407a6eaafeb7656ceb0ae9eca3f7cb9
Diffstat (limited to 'firmware/thread.c')
-rw-r--r--firmware/thread.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/firmware/thread.c b/firmware/thread.c
index 732675abf8..5e543c558a 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -178,25 +178,12 @@ void switch_thread(void)
* Processor/OS-specific section - include necessary core support
*/
-#if defined(HAVE_WIN32_FIBER_THREADS)
-#include "thread-win32.c"
-#elif defined(HAVE_SIGALTSTACK_THREADS)
-#include "thread-unix.c"
-#elif defined(CPU_ARM)
-#include "thread-arm.c"
+
+#include "asm/thread.c"
+
#if defined (CPU_PP)
#include "thread-pp.c"
#endif /* CPU_PP */
-#elif defined(CPU_COLDFIRE)
-#include "thread-coldfire.c"
-#elif CONFIG_CPU == SH7034
-#include "thread-sh.c"
-#elif defined(CPU_MIPS) && CPU_MIPS == 32
-#include "thread-mips32.c"
-#else
-/* Wouldn't compile anyway */
-#error Processor not implemented.
-#endif /* CONFIG_CPU == */
#ifndef IF_NO_SKIP_YIELD
#define IF_NO_SKIP_YIELD(...)