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/waitable_event.h" | 5 #include "base/synchronization/waitable_event.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <stddef.h> |
8 | 9 |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "base/numerics/safe_conversions.h" | 11 #include "base/numerics/safe_conversions.h" |
11 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 | 16 |
16 WaitableEvent::WaitableEvent(bool manual_reset, bool signaled) | 17 WaitableEvent::WaitableEvent(bool manual_reset, bool signaled) |
17 : handle_(CreateEvent(NULL, manual_reset, signaled, NULL)) { | 18 : handle_(CreateEvent(NULL, manual_reset, signaled, NULL)) { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 INFINITE); // no timeout | 88 INFINITE); // no timeout |
88 if (result >= WAIT_OBJECT_0 + count) { | 89 if (result >= WAIT_OBJECT_0 + count) { |
89 DPLOG(FATAL) << "WaitForMultipleObjects failed"; | 90 DPLOG(FATAL) << "WaitForMultipleObjects failed"; |
90 return 0; | 91 return 0; |
91 } | 92 } |
92 | 93 |
93 return result - WAIT_OBJECT_0; | 94 return result - WAIT_OBJECT_0; |
94 } | 95 } |
95 | 96 |
96 } // namespace base | 97 } // namespace base |
OLD | NEW |