| Index: mojo/edk/system/awakable_list.h
|
| diff --git a/mojo/edk/system/awakable_list.h b/mojo/edk/system/awakable_list.h
|
| index 4e788eeb34178b7aa8f69c34663b6ce9bbcd44a3..a80f5d6f8f7c81abd301c1351053c42abf2a95c5 100644
|
| --- a/mojo/edk/system/awakable_list.h
|
| +++ b/mojo/edk/system/awakable_list.h
|
| @@ -5,11 +5,14 @@
|
| #ifndef MOJO_EDK_SYSTEM_AWAKABLE_LIST_H_
|
| #define MOJO_EDK_SYSTEM_AWAKABLE_LIST_H_
|
|
|
| +#include <stddef.h>
|
| #include <stdint.h>
|
|
|
| #include <vector>
|
|
|
| #include "mojo/edk/system/system_impl_export.h"
|
| +#include "mojo/edk/system/watcher.h"
|
| +#include "mojo/edk/system/watcher_set.h"
|
| #include "mojo/public/c/system/types.h"
|
| #include "mojo/public/cpp/system/macros.h"
|
|
|
| @@ -36,6 +39,13 @@ class MOJO_SYSTEM_IMPL_EXPORT AwakableList {
|
| void Add(Awakable* awakable, MojoHandleSignals signals, uintptr_t context);
|
| void Remove(Awakable* awakable);
|
|
|
| + // Add and remove Watchers to this AwakableList.
|
| + MojoResult AddWatcher(MojoHandleSignals signals,
|
| + const Watcher::WatchCallback& callback,
|
| + uintptr_t context,
|
| + const HandleSignalsState& current_state);
|
| + MojoResult RemoveWatcher(uintptr_t context);
|
| +
|
| private:
|
| struct AwakeInfo {
|
| AwakeInfo(Awakable* awakable, MojoHandleSignals signals, uintptr_t context)
|
| @@ -49,6 +59,10 @@ class MOJO_SYSTEM_IMPL_EXPORT AwakableList {
|
|
|
| AwakeInfoList awakables_;
|
|
|
| + // TODO: Remove AwakableList and instead use WatcherSet directly in
|
| + // dispatchers.
|
| + WatcherSet watchers_;
|
| +
|
| MOJO_DISALLOW_COPY_AND_ASSIGN(AwakableList);
|
| };
|
|
|
|
|