summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator_mips.cc
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2017-08-31 15:21:57 -0700
committerHans Boehm <hboehm@google.com>2017-09-13 13:15:12 -0700
commit0882af2e3ca253184b6ab56a8966a2f37407144e (patch)
treedc61cf0d66ec576c6b2e3b78b5fb304afd6994c9 /compiler/optimizing/code_generator_mips.cc
parent6b411fc9fd94da3c552d8b96cee14f6414e7b734 (diff)
Shrink ART Mutex exclusive_owner_ field to Atomic<pid_t>
The old volatile uint64_t version had a data race, and was thus technically incorrect. Since it's unclear whether volatile uint64_t updates are actually atomic on 32-bit platforms, even the informal correctness argument here already effectively assumed that the upper 32 bits were zero. Don't store them. Explicitly complain if a pid_t might be too big to support lock-free atomic operations. Remove many explicit references to exclusive_owner to avoid littering the code with LoadRelaxed calls. The return convention for GetExclusiveOwnerTid() was unclear for the shared ownership case. It was previously treated inconsistently as 0 (pthread locks), (uint64_t)(-1U) and (uint64_t)(-1). Make it as consistent as easily possible, and document remaining weirdness. Bug: 65171052 Test: AOSP builds. Host tests pass. Change-Id: Ia99aca268952597a90b3c798b714cddbdc2c365e
Diffstat (limited to 'compiler/optimizing/code_generator_mips.cc')
0 files changed, 0 insertions, 0 deletions