stm32f103rey6: fix thread exit
Merge pull request #35 from thomaseichinger/thread_exit

stm32f103rey6: fix thread exit