Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 BASE_WIN_WAIT_CHAIN_H_ | |
| 6 #define BASE_WIN_WAIT_CHAIN_H_ | |
| 7 | |
| 8 #include <windows.h> | |
| 9 #include <wct.h> | |
| 10 | |
| 11 #include <vector> | |
| 12 | |
| 13 namespace base { | |
| 14 namespace win { | |
| 15 | |
| 16 using WaitChain = std::vector<WAITCHAIN_NODE_INFO>; | |
|
grt (UTC plus 2)
2016/04/12 14:31:12
consider WaitChainNodeInfoVector or WaitChainNodeV
Patrick Monette
2016/04/12 19:13:00
Done.
| |
| 17 | |
| 18 // Get the wait chain for the |thread_id|. Also specifies if the |wait_chain| | |
|
grt (UTC plus 2)
2016/04/12 14:31:12
nit: "Gets the wait chain for |thread_id|."
Patrick Monette
2016/04/12 19:13:00
Done.
| |
| 19 // contains a deadlock. Returns true on success. | |
| 20 // | |
| 21 // From MSDN: A wait chain is an alternating sequence of threads and | |
| 22 // synchronization objects; each thread waits for the object that follows it, | |
| 23 // which is owned by the subsequent thread in the chain. | |
| 24 bool GetThreadWaitChain(DWORD thread_id, | |
| 25 WaitChain* wait_chain, | |
| 26 bool* is_deadlock); | |
| 27 | |
| 28 // Returns a string that represents the node for a wait chain. | |
| 29 std::wstring WaitChainNodeToString(const WAITCHAIN_NODE_INFO& node); | |
| 30 | |
| 31 } // namespace win | |
| 32 } // namespace base | |
| 33 | |
| 34 #endif // BASE_WIN_WAIT_CHAIN_H_ | |
| OLD | NEW |