Chromium Code Reviews| Index: base/synchronization/condition_variable.h |
| diff --git a/base/synchronization/condition_variable.h b/base/synchronization/condition_variable.h |
| index a41b2ba5a7815e692ae44bc5a704925793b28c27..c0d1ab7c98b15c295d454f774296481bc7aa7f7d 100644 |
| --- a/base/synchronization/condition_variable.h |
| +++ b/base/synchronization/condition_variable.h |
| @@ -75,9 +75,12 @@ |
| #include <pthread.h> |
| #endif |
| +#if defined(OS_WIN) |
| +#include <windows.h> |
| +#endif |
| + |
| namespace base { |
| -class ConditionVarImpl; |
| class TimeDelta; |
| class BASE_EXPORT ConditionVariable { |
| @@ -100,14 +103,15 @@ class BASE_EXPORT ConditionVariable { |
| private: |
| #if defined(OS_WIN) |
| - ConditionVarImpl* impl_; |
| + CRITICAL_SECTION* const crit_sec_; |
|
scottmg
2016/04/06 18:34:04
nit; swap order to make win & posix match.
robliao
2016/04/06 19:22:18
I would have done that, but it diverges from the i
robliao
2016/04/06 19:24:53
I guess we already do that with user_lock_. Hands
|
| + CONDITION_VARIABLE cv_; |
| #elif defined(OS_POSIX) |
| pthread_cond_t condition_; |
| pthread_mutex_t* user_mutex_; |
| -#if DCHECK_IS_ON() |
| - base::Lock* user_lock_; // Needed to adjust shadow lock state on wait. |
| #endif |
| +#if DCHECK_IS_ON() && (defined(OS_WIN) || defined(OS_POSIX)) |
| + base::Lock* const user_lock_; // Needed to adjust shadow lock state on wait. |
| #endif |
| DISALLOW_COPY_AND_ASSIGN(ConditionVariable); |