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

Side by Side Diff: src/ports/SkMutex_win.h

Issue 419113002: Fix thread unsafe mutex initialization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clang 3.5 does not like unused static inlines in .cpp. Created 6 years, 4 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 | « src/ports/SkMutex_pthread.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 SkMutex_win_DEFINED 8 #ifndef SkMutex_win_DEFINED
9 #define SkMutex_win_DEFINED 9 #define SkMutex_win_DEFINED
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 private: 68 private:
69 SkBaseMutex(const SkBaseMutex&); 69 SkBaseMutex(const SkBaseMutex&);
70 SkBaseMutex& operator=(const SkBaseMutex&); 70 SkBaseMutex& operator=(const SkBaseMutex&);
71 }; 71 };
72 72
73 class SkMutex : public SkBaseMutex { }; 73 class SkMutex : public SkBaseMutex { };
74 74
75 // Windows currently provides no documented means of POD initializing a CRITICAL _SECTION. 75 // Windows currently provides no documented means of POD initializing a CRITICAL _SECTION.
76 // As a result, it is illegal to SK_DECLARE_STATIC_MUTEX in a function. 76 // As a result, it is illegal to SK_DECLARE_STATIC_MUTEX in a function.
77 #define SK_DECLARE_STATIC_MUTEX(name) \ 77 #define SK_DECLARE_STATIC_MUTEX(name) namespace{} static SkBaseMutex name
78 static inline void SK_MACRO_APPEND_LINE(name)(){} \
79 static SkBaseMutex name
80 78
81 #endif 79 #endif
OLDNEW
« no previous file with comments | « src/ports/SkMutex_pthread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698