To expand on this a little. My original intention for DSRs was that
they should contains relatively small amounts of code: just signal a
condition variable, post to a semaphore, send a message. They are all
mostly still like this. The only DSR that does anything more
substantial is that for the timer, running alarm functions, and then
those should also conform to the DSR model and be minimal.
The pupose of a DSR is to act as an intermediary between the ISR world
and the thread world. The real effect of running a DSR is to cause a
thread to be scheduled. Since all DSRs will be run before any thread
gets to start, it really does not matter what order they run in.
Of course we have already written distinctly non-trivial DSRs ourselves,
so we can hardly be said to be practising what we're preaching :-).