diff options
author | Hirokazu Honda <hiroh@google.com> | 2018-08-01 20:27:18 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-08-01 20:27:18 -0700 |
commit | b3e1d67d8f1744ec90473178b042be66230c6bb0 (patch) | |
tree | 7c75a642abe063c1fb5e86cb2246baeb7546855c /base/threading/thread_local_storage.h | |
parent | 40ce5dfb845e21b2e3344a87b124db7f4a57118d (diff) | |
parent | 780a5f1a24afe772e90085769ffc1bbc1ef39d48 (diff) | |
download | libchrome-b3e1d67d8f1744ec90473178b042be66230c6bb0.tar.gz |
ThreadLocalStorage: Add a function to destroy pthread key used in libchromeandroid-o-mr1-iot-release-1.0.3
am: 780a5f1a24
Change-Id: Ide6027489d3fda71bb47f891e33d3366012b2203
Diffstat (limited to 'base/threading/thread_local_storage.h')
-rw-r--r-- | base/threading/thread_local_storage.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/threading/thread_local_storage.h b/base/threading/thread_local_storage.h index fd2a789d01..c5c7759efc 100644 --- a/base/threading/thread_local_storage.h +++ b/base/threading/thread_local_storage.h @@ -75,6 +75,13 @@ class BASE_EXPORT PlatformThreadLocalStorage { // GetTLSValue() to retrieve the value of slot as it has already been reset // in Posix. static void OnThreadExit(void* value); + // Normally, Chrome runs as a process, so freeing the TLS is not needed since + // the OS will perform that while it's reclaiming the process' memory upon + // termination. If, however, this code is used inside a library that is + // dynamically loaded and unloaded, the consumer is responsible for calling + // this after all Chrome threads have stopped and prior to unloading the + // library. + static void ForceFreeTLS(); #endif }; |