Just pointing out: while this implementation is absolutely non- trivial to study, everytime I take a look at the abseil source, I am delighted with the quality of inline comments.
Well isn't that just a normal lock/mutex of the "lightweight" type (only enter kernel on contention)?