Index: mojo/edk/system/simple_dispatcher.h |
diff --git a/third_party/mojo/src/mojo/edk/system/simple_dispatcher.h b/mojo/edk/system/simple_dispatcher.h |
similarity index 69% |
copy from third_party/mojo/src/mojo/edk/system/simple_dispatcher.h |
copy to mojo/edk/system/simple_dispatcher.h |
index 542527daa61465bc994f119d7f74bc93d9a28fb0..ccef56433b8eb1b2f9495dd167d56e978e95bc5b 100644 |
--- a/third_party/mojo/src/mojo/edk/system/simple_dispatcher.h |
+++ b/mojo/edk/system/simple_dispatcher.h |
@@ -2,18 +2,18 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_SIMPLE_DISPATCHER_H_ |
-#define THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_SIMPLE_DISPATCHER_H_ |
+#ifndef MOJO_EDK_SYSTEM_SIMPLE_DISPATCHER_H_ |
+#define MOJO_EDK_SYSTEM_SIMPLE_DISPATCHER_H_ |
#include <list> |
+#include "mojo/edk/system/awakable_list.h" |
+#include "mojo/edk/system/dispatcher.h" |
+#include "mojo/edk/system/system_impl_export.h" |
#include "mojo/public/cpp/system/macros.h" |
-#include "third_party/mojo/src/mojo/edk/system/awakable_list.h" |
-#include "third_party/mojo/src/mojo/edk/system/dispatcher.h" |
-#include "third_party/mojo/src/mojo/edk/system/system_impl_export.h" |
namespace mojo { |
-namespace system { |
+namespace edk { |
// A base class for simple dispatchers. "Simple" means that there's a one-to-one |
// correspondence between handles and dispatchers (see the explanatory comment |
@@ -25,8 +25,9 @@ class MOJO_SYSTEM_IMPL_EXPORT SimpleDispatcher : public Dispatcher { |
~SimpleDispatcher() override; |
// To be called by subclasses when the state changes (so |
- // |GetHandleSignalsStateImplNoLock()| should be checked again). |
- void HandleSignalsStateChangedNoLock() MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex()); |
+ // |GetHandleSignalsStateImplNoLock()| should be checked again). Must be |
+ // called under lock. |
+ void HandleSignalsStateChangedNoLock(); |
// |Dispatcher| protected methods: |
void CancelAllAwakablesNoLock() override; |
@@ -38,12 +39,13 @@ class MOJO_SYSTEM_IMPL_EXPORT SimpleDispatcher : public Dispatcher { |
HandleSignalsState* signals_state) override; |
private: |
- AwakableList awakable_list_ MOJO_GUARDED_BY(mutex()); |
+ // Protected by |lock()|: |
+ AwakableList awakable_list_; |
MOJO_DISALLOW_COPY_AND_ASSIGN(SimpleDispatcher); |
}; |
-} // namespace system |
+} // namespace edk |
} // namespace mojo |
-#endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_SYSTEM_SIMPLE_DISPATCHER_H_ |
+#endif // MOJO_EDK_SYSTEM_SIMPLE_DISPATCHER_H_ |