| OLD | NEW |
| 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/system/data_pipe_consumer_dispatcher.h" | 5 #include "mojo/system/data_pipe_consumer_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "mojo/system/data_pipe.h" | 8 #include "mojo/system/data_pipe.h" |
| 9 #include "mojo/system/memory.h" | 9 #include "mojo/system/memory.h" |
| 10 | 10 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 buffer, buffer_num_bytes, (flags & MOJO_READ_DATA_FLAG_ALL_OR_NONE)); | 101 buffer, buffer_num_bytes, (flags & MOJO_READ_DATA_FLAG_ALL_OR_NONE)); |
| 102 } | 102 } |
| 103 | 103 |
| 104 MojoResult DataPipeConsumerDispatcher::EndReadDataImplNoLock( | 104 MojoResult DataPipeConsumerDispatcher::EndReadDataImplNoLock( |
| 105 uint32_t num_bytes_read) { | 105 uint32_t num_bytes_read) { |
| 106 lock().AssertAcquired(); | 106 lock().AssertAcquired(); |
| 107 | 107 |
| 108 return data_pipe_->ConsumerEndReadData(num_bytes_read); | 108 return data_pipe_->ConsumerEndReadData(num_bytes_read); |
| 109 } | 109 } |
| 110 | 110 |
| 111 MojoResult DataPipeConsumerDispatcher::AddWaiterImplNoLock(Waiter* waiter, | 111 MojoResult DataPipeConsumerDispatcher::AddWaiterImplNoLock( |
| 112 MojoWaitFlags flags, | 112 Waiter* waiter, |
| 113 uint32_t context) { | 113 MojoHandleSignals signals, |
| 114 uint32_t context) { |
| 114 lock().AssertAcquired(); | 115 lock().AssertAcquired(); |
| 115 return data_pipe_->ConsumerAddWaiter(waiter, flags, context); | 116 return data_pipe_->ConsumerAddWaiter(waiter, signals, context); |
| 116 } | 117 } |
| 117 | 118 |
| 118 void DataPipeConsumerDispatcher::RemoveWaiterImplNoLock(Waiter* waiter) { | 119 void DataPipeConsumerDispatcher::RemoveWaiterImplNoLock(Waiter* waiter) { |
| 119 lock().AssertAcquired(); | 120 lock().AssertAcquired(); |
| 120 data_pipe_->ConsumerRemoveWaiter(waiter); | 121 data_pipe_->ConsumerRemoveWaiter(waiter); |
| 121 } | 122 } |
| 122 | 123 |
| 123 bool DataPipeConsumerDispatcher::IsBusyNoLock() const { | 124 bool DataPipeConsumerDispatcher::IsBusyNoLock() const { |
| 124 lock().AssertAcquired(); | 125 lock().AssertAcquired(); |
| 125 return data_pipe_->ConsumerIsBusy(); | 126 return data_pipe_->ConsumerIsBusy(); |
| 126 } | 127 } |
| 127 | 128 |
| 128 } // namespace system | 129 } // namespace system |
| 129 } // namespace mojo | 130 } // namespace mojo |
| OLD | NEW |