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

Side by Side Diff: third_party/WebKit/Source/wtf/StackUtil.h

Issue 2623273007: Fast path for ThreadSpecific for main thread on TLS-slow platforms (Closed)
Patch Set: fix typofix typo Created 3 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef StackUtil_h
6 #define StackUtil_h
7
8 #include "wtf/Compiler.h"
9 #include "wtf/WTFExport.h"
10 #include "wtf/build_config.h"
11 #include <stddef.h>
12
13 namespace WTF {
14
15 WTF_EXPORT size_t getUnderestimatedStackSize();
16 WTF_EXPORT void* getStackStart();
17
18 namespace internal {
19
20 // Returns true if the function is not called on the main thread. Note carefully
21 // that this function may have false positives, i.e. it can return true even if
22 // we are on the main thread. If the function returns false, we are certainly
23 // not on the main thread. Must be WTF_EXPORT due to template inlining in
24 // ThreadSpecific.
25 WTF_EXPORT bool mayNotBeMainThread();
26
27 #if OS(WIN) && COMPILER(MSVC)
28 size_t threadStackSize();
29 #endif
30
31 } // namespace internal
32
33 } // namespace WTF
34
35 #endif // StackUtil_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698