Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1295)

Unified Diff: mojo/edk/system/awakable_list.h

Issue 2750373002: Revert of Mojo: Armed Watchers (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/awakable_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/awakable_list.h
diff --git a/mojo/edk/system/awakable_list.h b/mojo/edk/system/awakable_list.h
index 34d6b06922a041498d06a7d155c1124f4a8922d7..355677f7036771af72221e0ceee8d9d7c09b6f60 100644
--- a/mojo/edk/system/awakable_list.h
+++ b/mojo/edk/system/awakable_list.h
@@ -12,6 +12,8 @@
#include "base/macros.h"
#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"
namespace mojo {
@@ -37,6 +39,13 @@
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)
@@ -50,6 +59,10 @@
AwakeInfoList awakables_;
+ // TODO: Remove AwakableList and instead use WatcherSet directly in
+ // dispatchers.
+ WatcherSet watchers_;
+
DISALLOW_COPY_AND_ASSIGN(AwakableList);
};
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/awakable_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698