Mutex for task scheduler.

Patouf:
Are you saying that we can use the scheduler library with any board?

No ( hopefully soon though ), the mutex library is completely self contained. It is not reliant on an OS or the task scheduler. The test code posted above was tested on my UNO, the task scheduler is utilised when compiled for the DUE. The mutex works by hi-jacking the task scheduler's context changes and system interrupts. In reference to 8-bitters, this current setup is suitable for locking shared data between the main app flow and/or ISR's.

@fat16lib

I agree, a layered approach adds in redundancies, my mutex maintains its own task ID's to start off with.
The next steps I plan to take are to try and absorb the task scheduler into my design allowing a far more efficient approach ( hopefully ). There is also the possibility for an AVR based scheduler using a dedicated timer interrupt as a system management thread ( if the current task scheduler functionality isn't replicable on AVR ).

I will be looking at these things next, at the moment I'm testing some updates and optimisations, which I'll post shortly.