OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkTLS.h" | 8 #include "SkTLS.h" |
9 | 9 |
10 // enable to help debug TLS storage | 10 // enable to help debug TLS storage |
11 //#define SK_TRACE_TLS_LIFETIME | 11 //#define SK_TRACE_TLS_LIFETIME |
12 | 12 |
13 | 13 |
14 #ifdef SK_TRACE_TLS_LIFETIME | 14 #ifdef SK_TRACE_TLS_LIFETIME |
15 #include "../private/SkAtomics.h" | 15 #include "SkAtomics.h" |
16 static int32_t gTLSRecCount; | 16 static int32_t gTLSRecCount; |
17 #endif | 17 #endif |
18 | 18 |
19 struct SkTLSRec { | 19 struct SkTLSRec { |
20 SkTLSRec* fNext; | 20 SkTLSRec* fNext; |
21 void* fData; | 21 void* fData; |
22 SkTLS::CreateProc fCreateProc; | 22 SkTLS::CreateProc fCreateProc; |
23 SkTLS::DeleteProc fDeleteProc; | 23 SkTLS::DeleteProc fDeleteProc; |
24 | 24 |
25 #ifdef SK_TRACE_TLS_LIFETIME | 25 #ifdef SK_TRACE_TLS_LIFETIME |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // we have a new head of our chain | 121 // we have a new head of our chain |
122 SkTLS::PlatformSetSpecific(next); | 122 SkTLS::PlatformSetSpecific(next); |
123 } | 123 } |
124 delete curr; | 124 delete curr; |
125 break; | 125 break; |
126 } | 126 } |
127 prev = curr; | 127 prev = curr; |
128 curr = next; | 128 curr = next; |
129 } | 129 } |
130 } | 130 } |
OLD | NEW |