OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #ifndef SkOnce_DEFINED | 8 #ifndef SkOnce_DEFINED |
9 #define SkOnce_DEFINED | 9 #define SkOnce_DEFINED |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // | 146 // |
147 // The release barrier in sk_once_slow guaranteed that once->done = true | 147 // The release barrier in sk_once_slow guaranteed that once->done = true |
148 // happens after f(arg), so by syncing to once->done = true here we're | 148 // happens after f(arg), so by syncing to once->done = true here we're |
149 // forcing ourselves to also wait until the effects of f(arg) are readble. | 149 // forcing ourselves to also wait until the effects of f(arg) are readble. |
150 acquire_barrier(); | 150 acquire_barrier(); |
151 } | 151 } |
152 | 152 |
153 #undef ANNOTATE_BENIGN_RACE | 153 #undef ANNOTATE_BENIGN_RACE |
154 | 154 |
155 #endif // SkOnce_DEFINED | 155 #endif // SkOnce_DEFINED |
OLD | NEW |