summaryrefslogtreecommitdiff
path: root/runtime/class_linker_test.cc
diff options
context:
space:
mode:
author Hans Boehm <hboehm@google.com> 2022-01-28 15:07:02 -0800
committer Hans Boehm <hboehm@google.com> 2022-02-03 01:31:32 +0000
commit30bc7778e5ca5a76978b91054cb1debe6c96da06 (patch)
tree18970e9d4230a202b38d0b74fa19547c5a02564f /runtime/class_linker_test.cc
parent0f71b191492cc63b9c8835e85f6016228889da2f (diff)
Remove race on cached thread-name deletion
Manage the thread name using an RCU-like scheme, in which the name is an atomic pointer to an immutable string, and readers explicitly maintain a count of active readers. Writers wait until there are no readers before deallocating a name that was just replaced. Currently this potentially blocks writers, but readers should be very fast, and relatively infrequent, so I can't imagine this is a real issue. This also replaces JVM_SetNativeThreadName with a stub. This part of the CL came from Nicolas' aosp/1706702, which this is otherwise intended to replace. Test: Build and boot AOSP. Bug: 37970289 Change-Id: I7e1d13d24adc10b4009d60ee68bc9e837ce78b34
Diffstat (limited to 'runtime/class_linker_test.cc')
0 files changed, 0 insertions, 0 deletions