summaryrefslogtreecommitdiffstats
path: root/mojo/system/dispatcher.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mojo/system/dispatcher.cc')
-rw-r--r--mojo/system/dispatcher.cc40
1 files changed, 40 insertions, 0 deletions
diff --git a/mojo/system/dispatcher.cc b/mojo/system/dispatcher.cc
index acf42ee..ac02b83 100644
--- a/mojo/system/dispatcher.cc
+++ b/mojo/system/dispatcher.cc
@@ -125,6 +125,27 @@ MojoResult Dispatcher::EndReadData(uint32_t num_bytes_read) {
return EndReadDataImplNoLock(num_bytes_read);
}
+MojoResult Dispatcher::DuplicateBufferHandle(
+ const MojoDuplicateBufferHandleOptions* options,
+ scoped_refptr<Dispatcher>* new_dispatcher) {
+ base::AutoLock locker(lock_);
+ if (is_closed_)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ return DuplicateBufferHandleImplNoLock(options, new_dispatcher);
+}
+
+MojoResult Dispatcher::MapBuffer(uint64_t offset,
+ uint64_t num_bytes,
+ void** buffer,
+ MojoMapBufferFlags flags) {
+ base::AutoLock locker(lock_);
+ if (is_closed_)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ return MapBufferImplNoLock(offset, num_bytes, buffer, flags);
+}
+
MojoResult Dispatcher::AddWaiter(Waiter* waiter,
MojoWaitFlags flags,
MojoResult wake_result) {
@@ -240,6 +261,25 @@ MojoResult Dispatcher::EndReadDataImplNoLock(uint32_t /*num_bytes_read*/) {
return MOJO_RESULT_INVALID_ARGUMENT;
}
+MojoResult Dispatcher::DuplicateBufferHandleImplNoLock(
+ const MojoDuplicateBufferHandleOptions* /*options*/,
+ scoped_refptr<Dispatcher>* /*new_dispatcher*/) {
+ lock_.AssertAcquired();
+ DCHECK(!is_closed_);
+ // By default, not supported. Only needed for buffer dispatchers.
+ return MOJO_RESULT_INVALID_ARGUMENT;
+}
+
+MojoResult Dispatcher::MapBufferImplNoLock(uint64_t /*offset*/,
+ uint64_t /*num_bytes*/,
+ void** /*buffer*/,
+ MojoMapBufferFlags /*flags*/) {
+ lock_.AssertAcquired();
+ DCHECK(!is_closed_);
+ // By default, not supported. Only needed for buffer dispatchers.
+ return MOJO_RESULT_INVALID_ARGUMENT;
+}
+
MojoResult Dispatcher::AddWaiterImplNoLock(Waiter* /*waiter*/,
MojoWaitFlags /*flags*/,
MojoResult /*wake_result*/) {