diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-01-04 18:07:21 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-01-22 18:46:44 +0100 |
commit | 991ae1e39553172a7dd6cd8c634aebfce892e261 (patch) | |
tree | 672a4583af663def399c4fefdbad060605397fbc /firmware/asm/thread.c | |
parent | eaa83bd64775b87e943d345e2810deed44408776 (diff) | |
download | rockbox-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/asm/thread.c')
-rw-r--r-- | firmware/asm/thread.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/firmware/asm/thread.c b/firmware/asm/thread.c new file mode 100644 index 0000000000..49e71d73af --- /dev/null +++ b/firmware/asm/thread.c | |||
@@ -0,0 +1,21 @@ | |||
1 | #if defined(CPU_ARM) | ||
2 | #include "arm/thread.c" | ||
3 | #elif defined(CPU_COLDFIRE) | ||
4 | #include "m68k/thread.c" | ||
5 | #elif CONFIG_CPU == SH7034 | ||
6 | #include "sh/thread.c" | ||
7 | #elif defined(CPU_MIPS) | ||
8 | #include "mips/thread.c" | ||
9 | #else | ||
10 | |||
11 | /* generic thread.c */ | ||
12 | |||
13 | #if defined(HAVE_WIN32_FIBER_THREADS) | ||
14 | #include "thread-win32.c" | ||
15 | #elif defined(HAVE_SIGALTSTACK_THREADS) | ||
16 | #include "thread-unix.c" | ||
17 | #else | ||
18 | #error Missing thread impl | ||
19 | #endif | ||
20 | |||
21 | #endif | ||