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

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

Issue 2056763003: EDK: Change Awakable::Awake()'s context, etc., to be a uint64_t. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } else { 144 } else {
145 rv.satisfied_signals |= MOJO_HANDLE_SIGNAL_PEER_CLOSED; 145 rv.satisfied_signals |= MOJO_HANDLE_SIGNAL_PEER_CLOSED;
146 } 146 }
147 rv.satisfiable_signals |= MOJO_HANDLE_SIGNAL_PEER_CLOSED; 147 rv.satisfiable_signals |= MOJO_HANDLE_SIGNAL_PEER_CLOSED;
148 return rv; 148 return rv;
149 } 149 }
150 150
151 MojoResult LocalMessagePipeEndpoint::AddAwakable( 151 MojoResult LocalMessagePipeEndpoint::AddAwakable(
152 Awakable* awakable, 152 Awakable* awakable,
153 MojoHandleSignals signals, 153 MojoHandleSignals signals,
154 uint32_t context, 154 uint64_t context,
155 HandleSignalsState* signals_state) { 155 HandleSignalsState* signals_state) {
156 DCHECK(is_open_); 156 DCHECK(is_open_);
157 157
158 HandleSignalsState state = GetHandleSignalsState(); 158 HandleSignalsState state = GetHandleSignalsState();
159 if (state.satisfies(signals)) { 159 if (state.satisfies(signals)) {
160 if (signals_state) 160 if (signals_state)
161 *signals_state = state; 161 *signals_state = state;
162 return MOJO_RESULT_ALREADY_EXISTS; 162 return MOJO_RESULT_ALREADY_EXISTS;
163 } 163 }
164 if (!state.can_satisfy(signals)) { 164 if (!state.can_satisfy(signals)) {
(...skipping 10 matching lines...) Expand all
175 Awakable* awakable, 175 Awakable* awakable,
176 HandleSignalsState* signals_state) { 176 HandleSignalsState* signals_state) {
177 DCHECK(is_open_); 177 DCHECK(is_open_);
178 awakable_list_.Remove(awakable); 178 awakable_list_.Remove(awakable);
179 if (signals_state) 179 if (signals_state)
180 *signals_state = GetHandleSignalsState(); 180 *signals_state = GetHandleSignalsState();
181 } 181 }
182 182
183 } // namespace system 183 } // namespace system
184 } // namespace mojo 184 } // 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