diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-09-04 02:13:08 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-09-04 02:13:08 +0200 |
commit | adb9868498b93f89ae875df764d475c9f5c16049 (patch) | |
tree | db75a02e39434330d465f4d3232e2c48d79a954f | |
parent | bb2955ea4bb5c0f9431653351a47b373a2391389 (diff) |
Added Thread::start().
-rw-r--r-- | main.cpp | 2 | ||||
-rw-r--r-- | thread.h | 4 |
2 files changed, 5 insertions, 1 deletions
@@ -108,6 +108,8 @@ int main() { usart_enable(); + thread.start(); + while(1) { // Wait for a new update. while(!(TIM2.SR & 0x01)) { @@ -48,7 +48,9 @@ class Thread { // frame->lr = thread exit handler sp->pc = (uint32_t)func; sp->psr = 0x01000000; - + } + + void start() { next = active_thread->next; active_thread->next = this; } |