OLD | NEW |
(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 |
OLD | NEW |