Chromium Code Reviews| Index: chrome/chrome_watcher/wait_chain_util_win.h |
| diff --git a/chrome/chrome_watcher/wait_chain_util_win.h b/chrome/chrome_watcher/wait_chain_util_win.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..735ac70fe3bcea893f47bdb64e6ec6866c2e5041 |
| --- /dev/null |
| +++ b/chrome/chrome_watcher/wait_chain_util_win.h |
| @@ -0,0 +1,26 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
|
manzagop (departed)
2016/03/24 19:36:37
A few questions about form:
- What determines whet
Patrick Monette
2016/03/24 23:21:04
Lets not mess with components!
The _win suffix is
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_CHROME_WATCHER_WAIT_CHAIN_UTIL_WIN_H_ |
| +#define CHROME_CHROME_WATCHER_WAIT_CHAIN_UTIL_WIN_H_ |
| + |
| +#include <windows.h> |
| +#include <wct.h> |
| + |
| +#include <vector> |
| + |
| +// Get the wait chain for the |thread_id|. Also specifies if the |wait_chain| |
| +// contains a deadlock.Returns true on success. |
|
manzagop (departed)
2016/03/24 19:36:36
nit: missing whitespace
Patrick Monette
2016/03/24 23:21:04
Done.
|
| +// |
| +// From MSDN: A wait chain is an alternating sequence of threads and |
| +// synchronization objects; each thread waits for the object that follows it, |
| +// which is owned by the subsequent thread in the chain. |
| +bool GetThreadWaitChain(DWORD thread_id, |
| + std::vector<WAITCHAIN_NODE_INFO>* wait_chain, |
| + bool* is_deadlock); |
| + |
| +// Returns a string that represent the node for a wait chain. |
|
manzagop (departed)
2016/03/24 19:36:37
nit: represent*s*
Patrick Monette
2016/03/24 23:21:04
Done.
|
| +std::wstring WaitChainNodeToString(const WAITCHAIN_NODE_INFO& node); |
| + |
| +#endif // CHROME_CHROME_WATCHER_WAIT_CHAIN_UTIL_WIN_H_ |