Adding a class for lock/unlock. Alternative to synchronized.
Race condition (from Arduino issue/pull request).
Testing -O3 build.
Adding test of optimization strategy for switch statements.