OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MOJO_EDK_SYSTEM_WAITER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_WAITER_H_ |
6 #define MOJO_EDK_SYSTEM_WAITER_H_ | 6 #define MOJO_EDK_SYSTEM_WAITER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/synchronization/condition_variable.h" | 10 #include "base/synchronization/condition_variable.h" |
11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
12 #include "mojo/edk/system/awakable.h" | 12 #include "mojo/edk/system/awakable.h" |
13 #include "mojo/edk/system/system_impl_export.h" | 13 #include "mojo/edk/system/system_impl_export.h" |
14 #include "mojo/public/c/system/types.h" | 14 #include "third_party/mojo/src/mojo/public/c/system/types.h" |
15 #include "mojo/public/cpp/system/macros.h" | 15 #include "third_party/mojo/src/mojo/public/cpp/system/macros.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 namespace edk { | 18 namespace edk { |
19 | 19 |
20 // IMPORTANT (all-caps gets your attention, right?): |Waiter| methods are called | 20 // IMPORTANT (all-caps gets your attention, right?): |Waiter| methods are called |
21 // under other locks, in particular, |Dispatcher::lock_|s, so |Waiter| methods | 21 // under other locks, in particular, |Dispatcher::lock_|s, so |Waiter| methods |
22 // must never call out to other objects (in particular, |Dispatcher|s). This | 22 // must never call out to other objects (in particular, |Dispatcher|s). This |
23 // class is thread-safe. | 23 // class is thread-safe. |
24 class MOJO_SYSTEM_IMPL_EXPORT Waiter final : public Awakable { | 24 class MOJO_SYSTEM_IMPL_EXPORT Waiter final : public Awakable { |
25 public: | 25 public: |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 MojoResult awake_result_; | 70 MojoResult awake_result_; |
71 uintptr_t awake_context_; | 71 uintptr_t awake_context_; |
72 | 72 |
73 MOJO_DISALLOW_COPY_AND_ASSIGN(Waiter); | 73 MOJO_DISALLOW_COPY_AND_ASSIGN(Waiter); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace edk | 76 } // namespace edk |
77 } // namespace mojo | 77 } // namespace mojo |
78 | 78 |
79 #endif // MOJO_EDK_SYSTEM_WAITER_H_ | 79 #endif // MOJO_EDK_SYSTEM_WAITER_H_ |
OLD | NEW |