summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2007-06-05 19:10:54 +0000
committerMagnus Holmgren <magnushol@gmail.com>2007-06-05 19:10:54 +0000
commit57aa67468a71a46d3bb9a5396afd8360bd8a2a8f (patch)
tree00018ce68ef89c27a21ba999a0d9113f48da6aa8 /firmware
parent188b6013b07264f5cb31d92e985bebc096b5d78d (diff)
downloadrockbox-57aa67468a71a46d3bb9a5396afd8360bd8a2a8f.tar.gz
rockbox-57aa67468a71a46d3bb9a5396afd8360bd8a2a8f.zip
Apply FS#7183. Also change to use documented ways to avoid inlining of functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13564 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/thread.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/firmware/thread.c b/firmware/thread.c
index ff804e4337..b8bfeb4ef3 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -130,7 +130,7 @@ static inline void store_context(void* addr)
* Load non-volatile context.
*---------------------------------------------------------------------------
*/
-static void start_thread(void (*thread_func)(void), const void* addr) __attribute__((naked));
+static void start_thread(void (*thread_func)(void), const void* addr) __attribute__((naked,used));
static void start_thread(void (*thread_func)(void), const void* addr)
{
/* r0 = thread_func, r1 = addr */
@@ -160,7 +160,6 @@ static void start_thread(void (*thread_func)(void), const void* addr)
#endif
(void)thread_func;
(void)addr;
- (void)start_thread;
}
static inline void load_context(const void* addr)
@@ -386,9 +385,8 @@ static void remove_from_list(struct thread_entry **list,
thread->next->prev = thread->prev;
}
-/* Compiler trick: Don't declare as static to prevent putting
- * function in IRAM. */
-void check_sleepers(void)
+static void check_sleepers(void) __attribute__ ((noinline));
+static void check_sleepers(void)
{
struct thread_entry *current, *next;
@@ -428,6 +426,7 @@ void check_sleepers(void)
/* Safely finish waking all threads potentialy woken by interrupts -
* statearg already zeroed in wakeup_thread. */
+static void wake_list_awaken(void) __attribute__ ((noinline));
static void wake_list_awaken(void)
{
int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
@@ -506,9 +505,8 @@ void profile_thread(void) {
}
#endif
-/* Compiler trick: Don't declare as static to prevent putting
- * function in IRAM. */
-void change_thread_state(struct thread_entry **blocked_list)
+static void change_thread_state(struct thread_entry **blocked_list) __attribute__ ((noinline));
+static void change_thread_state(struct thread_entry **blocked_list)
{
struct thread_entry *old;
unsigned long new_state;