Use single contention counter for rw mutexes

This halves the number of sequentially consistent contention counter
loads when we release a mutex.

This is more expensive than keeping the contention counter as part
of the state word. But schemes to do that either risk overflow, or
seem more subtle than we we would like at this stage. This gets us
half-way to where we would like to be. And, since we were previously
always looking at both counters anyway, it seems like low risk
change.

Bug: 111835365
Test: Build and boot AOSP, TreeHugger
Change-Id: I752859f6c51283de3ba5078233d2873a733ad4a1
3 files changed