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

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

Issue 1776033002: Implement MojoGetBufferInformation(), part 1. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 MojoResult BeginReadData(UserPointer<const void*> buffer, 109 MojoResult BeginReadData(UserPointer<const void*> buffer,
110 UserPointer<uint32_t> buffer_num_bytes, 110 UserPointer<uint32_t> buffer_num_bytes,
111 MojoReadDataFlags flags); 111 MojoReadDataFlags flags);
112 MojoResult EndReadData(uint32_t num_bytes_read); 112 MojoResult EndReadData(uint32_t num_bytes_read);
113 // |options| may be null. |new_dispatcher| must not be null, but 113 // |options| may be null. |new_dispatcher| must not be null, but
114 // |*new_dispatcher| should be null (and will contain the dispatcher for the 114 // |*new_dispatcher| should be null (and will contain the dispatcher for the
115 // new handle on success). 115 // new handle on success).
116 MojoResult DuplicateBufferHandle( 116 MojoResult DuplicateBufferHandle(
117 UserPointer<const MojoDuplicateBufferHandleOptions> options, 117 UserPointer<const MojoDuplicateBufferHandleOptions> options,
118 util::RefPtr<Dispatcher>* new_dispatcher); 118 util::RefPtr<Dispatcher>* new_dispatcher);
119 MojoResult GetBufferInformation(UserPointer<MojoBufferInformation> info,
120 uint32_t info_num_bytes);
119 MojoResult MapBuffer( 121 MojoResult MapBuffer(
120 uint64_t offset, 122 uint64_t offset,
121 uint64_t num_bytes, 123 uint64_t num_bytes,
122 MojoMapBufferFlags flags, 124 MojoMapBufferFlags flags,
123 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping); 125 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping);
124 126
125 // Gets the current handle signals state. (The default implementation simply 127 // Gets the current handle signals state. (The default implementation simply
126 // returns a default-constructed |HandleSignalsState|, i.e., no signals 128 // returns a default-constructed |HandleSignalsState|, i.e., no signals
127 // satisfied or satisfiable.) Note: The state is subject to change from other 129 // satisfied or satisfiable.) Note: The state is subject to change from other
128 // threads. 130 // threads.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 virtual MojoResult BeginReadDataImplNoLock( 260 virtual MojoResult BeginReadDataImplNoLock(
259 UserPointer<const void*> buffer, 261 UserPointer<const void*> buffer,
260 UserPointer<uint32_t> buffer_num_bytes, 262 UserPointer<uint32_t> buffer_num_bytes,
261 MojoReadDataFlags flags) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 263 MojoReadDataFlags flags) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
262 virtual MojoResult EndReadDataImplNoLock(uint32_t num_bytes_read) 264 virtual MojoResult EndReadDataImplNoLock(uint32_t num_bytes_read)
263 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 265 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
264 virtual MojoResult DuplicateBufferHandleImplNoLock( 266 virtual MojoResult DuplicateBufferHandleImplNoLock(
265 UserPointer<const MojoDuplicateBufferHandleOptions> options, 267 UserPointer<const MojoDuplicateBufferHandleOptions> options,
266 util::RefPtr<Dispatcher>* new_dispatcher) 268 util::RefPtr<Dispatcher>* new_dispatcher)
267 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 269 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
270 virtual MojoResult GetBufferInformationImplNoLock(
271 UserPointer<MojoBufferInformation> info,
272 uint32_t info_num_bytes) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
268 virtual MojoResult MapBufferImplNoLock( 273 virtual MojoResult MapBufferImplNoLock(
269 uint64_t offset, 274 uint64_t offset,
270 uint64_t num_bytes, 275 uint64_t num_bytes,
271 MojoMapBufferFlags flags, 276 MojoMapBufferFlags flags,
272 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping) 277 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping)
273 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 278 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
274 virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const 279 virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const
275 MOJO_SHARED_LOCKS_REQUIRED(mutex_); 280 MOJO_SHARED_LOCKS_REQUIRED(mutex_);
276 virtual MojoResult AddAwakableImplNoLock(Awakable* awakable, 281 virtual MojoResult AddAwakableImplNoLock(Awakable* awakable,
277 MojoHandleSignals signals, 282 MojoHandleSignals signals,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 428
424 // So logging macros and |DCHECK_EQ()|, etc. work. 429 // So logging macros and |DCHECK_EQ()|, etc. work.
425 inline std::ostream& operator<<(std::ostream& out, Dispatcher::Type type) { 430 inline std::ostream& operator<<(std::ostream& out, Dispatcher::Type type) {
426 return out << static_cast<int>(type); 431 return out << static_cast<int>(type);
427 } 432 }
428 433
429 } // namespace system 434 } // namespace system
430 } // namespace mojo 435 } // namespace mojo
431 436
432 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ 437 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698