diff options
Diffstat (limited to 'firmware/thread.c')
-rw-r--r-- | firmware/thread.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/firmware/thread.c b/firmware/thread.c index ea518ca4ee..aedd665d2e 100644 --- a/firmware/thread.c +++ b/firmware/thread.c | |||
@@ -33,7 +33,6 @@ struct regs | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | int num_threads; | 35 | int num_threads; |
36 | bool cpu_sleep_enabled; | ||
37 | static volatile int num_sleepers; | 36 | static volatile int num_sleepers; |
38 | static int current_thread; | 37 | static int current_thread; |
39 | static struct regs thread_contexts[MAXTHREADS] __attribute__ ((section(".idata"))); | 38 | static struct regs thread_contexts[MAXTHREADS] __attribute__ ((section(".idata"))); |
@@ -104,7 +103,7 @@ void switch_thread(void) | |||
104 | /* Do nothing */ | 103 | /* Do nothing */ |
105 | #else | 104 | #else |
106 | 105 | ||
107 | while (cpu_sleep_enabled && num_sleepers == num_threads) | 106 | while (num_sleepers == num_threads) |
108 | { | 107 | { |
109 | /* Enter sleep mode, woken up on interrupt */ | 108 | /* Enter sleep mode, woken up on interrupt */ |
110 | SBYCR &= 0x7F; | 109 | SBYCR &= 0x7F; |
@@ -125,11 +124,6 @@ void switch_thread(void) | |||
125 | panicf("Stkov %s", thread_name[next]); | 124 | panicf("Stkov %s", thread_name[next]); |
126 | } | 125 | } |
127 | 126 | ||
128 | void cpu_sleep(bool enabled) | ||
129 | { | ||
130 | cpu_sleep_enabled = enabled; | ||
131 | } | ||
132 | |||
133 | void sleep_thread(void) | 127 | void sleep_thread(void) |
134 | { | 128 | { |
135 | ++num_sleepers; | 129 | ++num_sleepers; |