Open yuriykulikov opened 11 years ago
This does not seem realistic. As an alternative I would consider a one thread looper. All blocking threads can be replaced by interrupt handling routines. It means that common lines interpreter will work in the isr thread, which is not so good, but should be okay for small controllers like attiny. For everything else just use freertos.
Goal is to schedule threads cooperatively, which will allow to maintain compatability of single and multithreaded code (at least partially). To implement this, threads should contain a short body, which does not block in single-threaded environment. It will be something like blocking on an queue with a 0 timeout - body immediately returns if it has nothing to do.