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

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

Issue 2728453006: WTF: Initialize main-thread stack estimates when WTF starts up. (Closed)
Patch Set: fix cast for windows Created 3 years, 9 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
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 29 matching lines...) Expand all
40 #if OS(WIN) 40 #if OS(WIN)
41 typedef uint32_t ThreadIdentifier; 41 typedef uint32_t ThreadIdentifier;
42 #else 42 #else
43 typedef intptr_t ThreadIdentifier; 43 typedef intptr_t ThreadIdentifier;
44 #endif 44 #endif
45 45
46 namespace internal { 46 namespace internal {
47 WTF_EXPORT ThreadIdentifier currentThreadSyscall(); 47 WTF_EXPORT ThreadIdentifier currentThreadSyscall();
48 } // namespace internal 48 } // namespace internal
49 49
50 // Must be called before |currentThread|.
haraken 2017/03/06 01:44:03 Can we add a dcheck about this fact? BTW, who cal
jbroman 2017/03/06 16:14:03 Sure.
51 WTF_EXPORT void initializeCurrentThread();
52
50 WTF_EXPORT ThreadIdentifier currentThread(); 53 WTF_EXPORT ThreadIdentifier currentThread();
51 54
52 #if DCHECK_IS_ON() 55 #if DCHECK_IS_ON()
53 WTF_EXPORT bool isBeforeThreadCreated(); 56 WTF_EXPORT bool isBeforeThreadCreated();
54 WTF_EXPORT void willCreateThread(); 57 WTF_EXPORT void willCreateThread();
55 #endif 58 #endif
56 59
57 } // namespace WTF 60 } // namespace WTF
58 61
59 using WTF::ThreadIdentifier; 62 using WTF::ThreadIdentifier;
60 using WTF::currentThread; 63 using WTF::currentThread;
61 64
62 #endif // Threading_h 65 #endif // Threading_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698