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

Side by Side Diff: Source/wtf/Threading.h

Issue 874203002: Add a thread-safety assertion in DEFINE_STATIC_LOCAL (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: added noncopyable Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 typedef uint32_t ThreadIdentifier; 69 typedef uint32_t ThreadIdentifier;
70 #else 70 #else
71 typedef intptr_t ThreadIdentifier; 71 typedef intptr_t ThreadIdentifier;
72 #endif 72 #endif
73 73
74 WTF_EXPORT ThreadIdentifier currentThread(); 74 WTF_EXPORT ThreadIdentifier currentThread();
75 75
76 WTF_EXPORT void lockAtomicallyInitializedStaticMutex(); 76 WTF_EXPORT void lockAtomicallyInitializedStaticMutex();
77 WTF_EXPORT void unlockAtomicallyInitializedStaticMutex(); 77 WTF_EXPORT void unlockAtomicallyInitializedStaticMutex();
78 78
79 #if ENABLE(ASSERT)
80 WTF_EXPORT bool isAtomicallyInitializedStaticMutexLockHeld();
81 WTF_EXPORT bool isBeforeThreadCreated();
82 WTF_EXPORT void willCreateThread();
83 #endif
84
79 } // namespace WTF 85 } // namespace WTF
80 86
81 using WTF::ThreadIdentifier; 87 using WTF::ThreadIdentifier;
82 using WTF::currentThread; 88 using WTF::currentThread;
83 89
84 #endif // Threading_h 90 #endif // Threading_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698