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

Side by Side Diff: mojo/edk/system/local_message_pipe_endpoint.cc

Issue 2060943007: Make it possible to remove an Awakable with a specific "context" from a Dispatcher. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/local_message_pipe_endpoint.h ('k') | mojo/edk/system/message_pipe.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "mojo/edk/system/local_message_pipe_endpoint.h" 5 #include "mojo/edk/system/local_message_pipe_endpoint.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 void LocalMessagePipeEndpoint::RemoveAwakable( 177 void LocalMessagePipeEndpoint::RemoveAwakable(
178 Awakable* awakable, 178 Awakable* awakable,
179 HandleSignalsState* signals_state) { 179 HandleSignalsState* signals_state) {
180 DCHECK(is_open_); 180 DCHECK(is_open_);
181 awakable_list_.Remove(awakable); 181 awakable_list_.Remove(awakable);
182 if (signals_state) 182 if (signals_state)
183 *signals_state = GetHandleSignalsState(); 183 *signals_state = GetHandleSignalsState();
184 } 184 }
185 185
186 void LocalMessagePipeEndpoint::RemoveAwakableWithContext(
187 Awakable* awakable,
188 uint64_t context,
189 HandleSignalsState* signals_state) {
190 DCHECK(is_open_);
191 awakable_list_.RemoveWithContext(awakable, context);
192 if (signals_state)
193 *signals_state = GetHandleSignalsState();
194 }
195
186 } // namespace system 196 } // namespace system
187 } // namespace mojo 197 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/local_message_pipe_endpoint.h ('k') | mojo/edk/system/message_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698