From abd9f83e92fae22dcb9806deae665b7b303f430d Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 19 Oct 2005 19:35:24 +0000 Subject: Two new sections for IRAM usage: .irodata (selectable with the ICONST_ATTR attribute macro), allowing to put 'const' data into IRAM without causing a section type conflict, and .ibss (selectable with the IBSS_ATTR attribute macro) for uninitialised data. * Rockbox core: Adjusted the linker scripts and init code to not include the .ibss section in the binary, it is cleared instead. Saves ~500 bytes on archos and ~30KB on iriver. Codecs and plugins don't handle .ibss in a special way yet. * The init code properly handles empty sections now (except .stack, which should never be empty). * Unified the init code for SH1 and coldfire a bit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7644 a1c6a512-1295-4272-9138-f99709370657 --- firmware/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'firmware/thread.c') diff --git a/firmware/thread.c b/firmware/thread.c index 5bbea31..7ee4072 100644 --- a/firmware/thread.c +++ b/firmware/thread.c @@ -57,7 +57,7 @@ struct regs int num_threads; static volatile int num_sleepers; static int current_thread; -static struct regs thread_contexts[MAXTHREADS] __attribute__ ((section(".idata"))); +static struct regs thread_contexts[MAXTHREADS] IBSS_ATTR; const char *thread_name[MAXTHREADS]; void *thread_stack[MAXTHREADS]; int thread_stack_size[MAXTHREADS]; @@ -66,7 +66,7 @@ static const char main_thread_name[] = "main"; extern int stackbegin[]; extern int stackend[]; -void switch_thread(void) __attribute__ ((section(".icode"))); +void switch_thread(void) ICODE_ATTR; static inline void store_context(void* addr) __attribute__ ((always_inline)); static inline void load_context(const void* addr) __attribute__ ((always_inline)); -- cgit v1.1