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

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

Issue 1949283002: EDK: Replace HandleTable::GetAndRemoveDispatcher() with GetAndRemoveHandle(). (Closed) Base URL: https://github.com/domokit/mojo.git@work789_edk_handle_13.3-x-work788_edk_handle_13.2
Patch Set: Created 4 years, 7 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 | « no previous file | mojo/edk/system/core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.h
diff --git a/mojo/edk/system/core.h b/mojo/edk/system/core.h
index d61ec1121a1e25ba9f3220a80a41305cba2bd0d1..18ad059ecce4cfeec4dad196b23836fc655b43b2 100644
--- a/mojo/edk/system/core.h
+++ b/mojo/edk/system/core.h
@@ -37,6 +37,9 @@ struct HandleSignalsState;
// |Core| is an object that implements the Mojo system calls. All public methods
// are thread-safe.
+//
+// Convention: |MojoHandle|s are referred to as |handle| or |foo_handle|,
+// whereas |Handle|s are just |h|.
class Core {
public:
// ---------------------------------------------------------------------------
@@ -50,19 +53,19 @@ class Core {
// Adds |handle| (which must have a dispatcher) to the handle table, returning
// the handle value for it. Returns |MOJO_HANDLE_INVALID| on failure, namely
// if the handle table is full.
- MojoHandle AddHandle(Handle&& handle);
+ MojoHandle AddHandle(Handle&& h);
// Looks up the dispatcher for the given handle value. On success, gets the
// dispatcher for a given handle value. On failure, returns an appropriate
// result and leaves |dispatcher| alone), namely
// |MOJO_RESULT_INVALID_ARGUMENT| if the handle value is invalid or
// |MOJO_RESULT_BUSY| if the handle is marked as busy.
- MojoResult GetDispatcher(MojoHandle handle_value,
+ MojoResult GetDispatcher(MojoHandle handle,
util::RefPtr<Dispatcher>* dispatcher);
// Like |GetDispatcher()|, but on success also removes the handle from the
// handle table.
- MojoResult GetAndRemoveDispatcher(MojoHandle handle_value,
+ MojoResult GetAndRemoveDispatcher(MojoHandle handle,
util::RefPtr<Dispatcher>* dispatcher);
// Watches on the given handle for the given signals, calling |callback| when
« no previous file with comments | « no previous file | mojo/edk/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698