summaryrefslogtreecommitdiff
path: root/firmware/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/thread.c')
-rw-r--r--firmware/thread.c8
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
35int num_threads; 35int num_threads;
36bool cpu_sleep_enabled;
37static volatile int num_sleepers; 36static volatile int num_sleepers;
38static int current_thread; 37static int current_thread;
39static struct regs thread_contexts[MAXTHREADS] __attribute__ ((section(".idata"))); 38static 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
128void cpu_sleep(bool enabled)
129{
130 cpu_sleep_enabled = enabled;
131}
132
133void sleep_thread(void) 127void sleep_thread(void)
134{ 128{
135 ++num_sleepers; 129 ++num_sleepers;