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

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: Created 5 years, 11 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 typedef uint32_t ThreadIdentifier; 56 typedef uint32_t ThreadIdentifier;
57 #else 57 #else
58 typedef intptr_t ThreadIdentifier; 58 typedef intptr_t ThreadIdentifier;
59 #endif 59 #endif
60 60
61 WTF_EXPORT ThreadIdentifier currentThread(); 61 WTF_EXPORT ThreadIdentifier currentThread();
62 62
63 WTF_EXPORT void lockAtomicallyInitializedStaticMutex(); 63 WTF_EXPORT void lockAtomicallyInitializedStaticMutex();
64 WTF_EXPORT void unlockAtomicallyInitializedStaticMutex(); 64 WTF_EXPORT void unlockAtomicallyInitializedStaticMutex();
65 65
66 #if ENABLE(ASSERT)
67 WTF_EXPORT bool isAtomicallyInitializedStaticMutexLockHeld();
68 WTF_EXPORT bool isBeforeThreadCreated();
69 WTF_EXPORT void willCreateThread();
70 #endif
71
66 } // namespace WTF 72 } // namespace WTF
67 73
68 using WTF::ThreadIdentifier; 74 using WTF::ThreadIdentifier;
69 using WTF::currentThread; 75 using WTF::currentThread;
70 76
71 #endif // Threading_h 77 #endif // Threading_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698