I've used counters in Redis for mutex control. If incr returns 1, it means we have succeeded. Otherwise it decrements it and tries again after 1 second until it suceeds.
Here is the code: https://gist.github.com/1062584
Here is the code: https://gist.github.com/1062584
:)