pyro,
I'm curious where you headed with this mutex stuff.
In my mind mutexes are not simple exclusions of everything as would be implied with the
simple ATOMIC BLOCK stuff as they are in the AVR world.
When I use mutexes in real operating systems, I'm protecting particular resources and I don't
want to block out other threads particularly when those threads might be on other processors.
Obviously muti-processor is a more complex environment but threads can be very relevant.
For example, when a processor supports interrupts levels it is VERY useful to allow interrupts to nest
and interrupt each other because often the ISRs don't deal with the same resources.
So for me, I consider it very important to be able to block certain interrupts but not all
of them. I like the simple splx() type of prioritization that controls priority levels.
Where something a splhi() can be use to block everything including the scheduler.
but other levels could be used to out other less important things.
How is this kind of functionality going to work with ATOMIC BLOCK and mutexes?
Just a few quick thoughts.
---bill