diff options
Diffstat (limited to 'firmware/thread.c')
-rw-r--r-- | firmware/thread.c | 14 |
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 | */ |
133 | static void start_thread(void (*thread_func)(void), const void* addr) __attribute__((naked)); | 133 | static void start_thread(void (*thread_func)(void), const void* addr) __attribute__((naked,used)); |
134 | static void start_thread(void (*thread_func)(void), const void* addr) | 134 | static 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 | ||
166 | static inline void load_context(const void* addr) | 165 | static 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 | 388 | static void check_sleepers(void) __attribute__ ((noinline)); |
390 | * function in IRAM. */ | 389 | static void check_sleepers(void) |
391 | void 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. */ |
429 | static void wake_list_awaken(void) __attribute__ ((noinline)); | ||
431 | static void wake_list_awaken(void) | 430 | static 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 | 508 | static void change_thread_state(struct thread_entry **blocked_list) __attribute__ ((noinline)); |
510 | * function in IRAM. */ | 509 | static void change_thread_state(struct thread_entry **blocked_list) |
511 | void 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; |