Search code examples
real-timeecos

Stop all threads in ecos and run main


I have the following problem: I use ecos for my micro controller and I start multiple threads with 'cyg_scheduler_start();'. Now I want to stop them, no problem with 'cyg_thread_exit()'. But if I stop the last Task, the micro controller doesn't return to main, where I call the threads. The main should run after the start of the threads a led.

or at least, to say start the other threads after the first threads are finished. I use at the moment cyg_thread_suspend and cyg_thread_resume to realise this. But is there a better way to do this?


Solution

  • the answer is more or less very simple. It doesn't go. What you could do is one thread to handle the other threads, just an idea.