summaryrefslogtreecommitdiff
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
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
-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)
130 * Load non-volatile context. 130 * Load non-volatile context.
131 *--------------------------------------------------------------------------- 131 *---------------------------------------------------------------------------
132 */ 132 */
133static void start_thread(void (*thread_func)(void), const void* addr) __attribute__((naked)); 133static void start_thread(void (*thread_func)(void), const void* addr) __attribute__((naked,used));
134static void start_thread(void (*thread_func)(void), const void* addr) 134static void start_thread(void (*thread_func)(void), const void* addr)
135{ 135{
136 /* r0 = thread_func, r1 = addr */ 136 /* r0 = thread_func, r1 = addr */
@@ -160,7 +160,6 @@ static void start_thread(void (*thread_func)(void), const void* addr)
160#endif 160#endif
161 (void)thread_func; 161 (void)thread_func;
162 (void)addr; 162 (void)addr;
163 (void)start_thread;
164} 163}
165 164
166static inline void load_context(const void* addr) 165static inline void load_context(const void* addr)
@@ -386,9 +385,8 @@ static void remove_from_list(struct thread_entry **list,
386 thread->next->prev = thread->prev; 385 thread->next->prev = thread->prev;
387} 386}
388 387
389/* Compiler trick: Don't declare as static to prevent putting 388static void check_sleepers(void) __attribute__ ((noinline));
390 * function in IRAM. */ 389static void check_sleepers(void)
391void check_sleepers(void)
392{ 390{
393 struct thread_entry *current, *next; 391 struct thread_entry *current, *next;
394 392
@@ -428,6 +426,7 @@ void check_sleepers(void)
428 426
429/* Safely finish waking all threads potentialy woken by interrupts - 427/* Safely finish waking all threads potentialy woken by interrupts -
430 * statearg already zeroed in wakeup_thread. */ 428 * statearg already zeroed in wakeup_thread. */
429static void wake_list_awaken(void) __attribute__ ((noinline));
431static void wake_list_awaken(void) 430static void wake_list_awaken(void)
432{ 431{
433 int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL); 432 int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
@@ -506,9 +505,8 @@ void profile_thread(void) {
506} 505}
507#endif 506#endif
508 507
509/* Compiler trick: Don't declare as static to prevent putting 508static void change_thread_state(struct thread_entry **blocked_list) __attribute__ ((noinline));
510 * function in IRAM. */ 509static void change_thread_state(struct thread_entry **blocked_list)
511void change_thread_state(struct thread_entry **blocked_list)
512{ 510{
513 struct thread_entry *old; 511 struct thread_entry *old;
514 unsigned long new_state; 512 unsigned long new_state;