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

Side by Side Diff: mojo/edk/system/dispatcher.h

Issue 1403033003: Last set of fixes to make the src/mojo/edk pass the page cycler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 2 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/data_pipe_producer_dispatcher.cc ('k') | mojo/edk/system/dispatcher.cc » ('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 #ifndef MOJO_EDK_SYSTEM_DISPATCHER_H_ 5 #ifndef MOJO_EDK_SYSTEM_DISPATCHER_H_
6 #define MOJO_EDK_SYSTEM_DISPATCHER_H_ 6 #define MOJO_EDK_SYSTEM_DISPATCHER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 MojoHandleSignals signals, 263 MojoHandleSignals signals,
264 uint32_t context, 264 uint32_t context,
265 HandleSignalsState* signals_state); 265 HandleSignalsState* signals_state);
266 virtual void RemoveAwakableImplNoLock(Awakable* awakable, 266 virtual void RemoveAwakableImplNoLock(Awakable* awakable,
267 HandleSignalsState* signals_state); 267 HandleSignalsState* signals_state);
268 268
269 // These implement the API used to serialize dispatchers (described below). 269 // These implement the API used to serialize dispatchers (described below).
270 // They will only be called on a dispatcher that's attached to and "owned" by 270 // They will only be called on a dispatcher that's attached to and "owned" by
271 // a |MessageInTransit|. See the non-"impl" versions for more information. 271 // a |MessageInTransit|. See the non-"impl" versions for more information.
272 // 272 //
273 // Note: |StartSerializeImplNoLock()| is actually called with |lock_| NOT
274 // held, since the dispatcher should only be accessible to the calling thread.
275 // On Debug builds, |EndSerializeAndCloseImplNoLock()| is called with |lock_|
276 // held, to satisfy any |lock_.AssertAcquired()| (e.g., in |CloseImplNoLock()|
277 // -- and anything it calls); disentangling those assertions is
278 // difficult/fragile, and would weaken our general checking of invariants.
279 //
280 // TODO(vtl): Consider making these pure virtual once most things support 273 // TODO(vtl): Consider making these pure virtual once most things support
281 // being passed over a message pipe. 274 // being passed over a message pipe.
282 virtual void StartSerializeImplNoLock(size_t* max_size, 275 virtual void StartSerializeImplNoLock(size_t* max_size,
283 size_t* max_platform_handles); 276 size_t* max_platform_handles);
284 virtual bool EndSerializeAndCloseImplNoLock( 277 virtual bool EndSerializeAndCloseImplNoLock(
285 void* destination, 278 void* destination,
286 size_t* actual_size, 279 size_t* actual_size,
287 PlatformHandleVector* platform_handles); 280 PlatformHandleVector* platform_handles);
288 281
289 // These are called before and after a dispatcher is being transported. i.e. 282 // These are called before and after a dispatcher is being transported. i.e.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // So logging macros and |DCHECK_EQ()|, etc. work. 393 // So logging macros and |DCHECK_EQ()|, etc. work.
401 MOJO_SYSTEM_IMPL_EXPORT inline std::ostream& operator<<(std::ostream& out, 394 MOJO_SYSTEM_IMPL_EXPORT inline std::ostream& operator<<(std::ostream& out,
402 Dispatcher::Type type) { 395 Dispatcher::Type type) {
403 return out << static_cast<int>(type); 396 return out << static_cast<int>(type);
404 } 397 }
405 398
406 } // namespace edk 399 } // namespace edk
407 } // namespace mojo 400 } // namespace mojo
408 401
409 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ 402 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/data_pipe_producer_dispatcher.cc ('k') | mojo/edk/system/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698