Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Side by Side Diff: base/threading/thread_local_android.cc

Issue 1726203002: Refactor thread_local.h's TLS Implementation to use ThreadLocalStorage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to d98ce9a Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/threading/thread_local.h ('k') | base/threading/thread_local_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/threading/thread_local.h"
6
7 namespace base {
8 namespace internal {
9
10 // static
11 void ThreadLocalPlatform::AllocateSlot(SlotType* slot) {
12 slot->Initialize(nullptr);
13 }
14
15 // static
16 void ThreadLocalPlatform::FreeSlot(SlotType slot) {
17 slot.Free();
18 }
19
20 // static
21 void* ThreadLocalPlatform::GetValueFromSlot(SlotType slot) {
22 return slot.Get();
23 }
24
25 // static
26 void ThreadLocalPlatform::SetValueInSlot(SlotType slot, void* value) {
27 slot.Set(value);
28 }
29
30 } // namespace internal
31 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/thread_local.h ('k') | base/threading/thread_local_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698