OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/synchronization/condition_variable.h" | 5 #include "base/synchronization/condition_variable.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <stack> | 8 #include <stack> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
14 #include "base/time.h" | 14 #include "base/time/time.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 // We can't use the linker supported delay-load for kernel32 so all this | 17 // We can't use the linker supported delay-load for kernel32 so all this |
18 // cruft here is to manually late-bind the needed functions. | 18 // cruft here is to manually late-bind the needed functions. |
19 typedef void (WINAPI *InitializeConditionVariableFn)(PCONDITION_VARIABLE); | 19 typedef void (WINAPI *InitializeConditionVariableFn)(PCONDITION_VARIABLE); |
20 typedef BOOL (WINAPI *SleepConditionVariableCSFn)(PCONDITION_VARIABLE, | 20 typedef BOOL (WINAPI *SleepConditionVariableCSFn)(PCONDITION_VARIABLE, |
21 PCRITICAL_SECTION, DWORD); | 21 PCRITICAL_SECTION, DWORD); |
22 typedef void (WINAPI *WakeConditionVariableFn)(PCONDITION_VARIABLE); | 22 typedef void (WINAPI *WakeConditionVariableFn)(PCONDITION_VARIABLE); |
23 typedef void (WINAPI *WakeAllConditionVariableFn)(PCONDITION_VARIABLE); | 23 typedef void (WINAPI *WakeAllConditionVariableFn)(PCONDITION_VARIABLE); |
24 | 24 |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 | 660 |
661 void ConditionVariable::Broadcast() { | 661 void ConditionVariable::Broadcast() { |
662 impl_->Broadcast(); | 662 impl_->Broadcast(); |
663 } | 663 } |
664 | 664 |
665 void ConditionVariable::Signal() { | 665 void ConditionVariable::Signal() { |
666 impl_->Signal(); | 666 impl_->Signal(); |
667 } | 667 } |
668 | 668 |
669 } // namespace base | 669 } // namespace base |
OLD | NEW |