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_producer_dispatcher.h" | 5 #include "mojo/system/data_pipe_producer_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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 buffer, buffer_num_bytes, (flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE)); | 80 buffer, buffer_num_bytes, (flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE)); |
81 } | 81 } |
82 | 82 |
83 MojoResult DataPipeProducerDispatcher::EndWriteDataImplNoLock( | 83 MojoResult DataPipeProducerDispatcher::EndWriteDataImplNoLock( |
84 uint32_t num_bytes_written) { | 84 uint32_t num_bytes_written) { |
85 lock().AssertAcquired(); | 85 lock().AssertAcquired(); |
86 | 86 |
87 return data_pipe_->ProducerEndWriteData(num_bytes_written); | 87 return data_pipe_->ProducerEndWriteData(num_bytes_written); |
88 } | 88 } |
89 | 89 |
90 MojoResult DataPipeProducerDispatcher::AddWaiterImplNoLock(Waiter* waiter, | 90 MojoResult DataPipeProducerDispatcher::AddWaiterImplNoLock( |
91 MojoWaitFlags flags, | 91 Waiter* waiter, |
92 uint32_t context) { | 92 MojoHandleSignals signals, |
| 93 uint32_t context) { |
93 lock().AssertAcquired(); | 94 lock().AssertAcquired(); |
94 return data_pipe_->ProducerAddWaiter(waiter, flags, context); | 95 return data_pipe_->ProducerAddWaiter(waiter, signals, context); |
95 } | 96 } |
96 | 97 |
97 void DataPipeProducerDispatcher::RemoveWaiterImplNoLock(Waiter* waiter) { | 98 void DataPipeProducerDispatcher::RemoveWaiterImplNoLock(Waiter* waiter) { |
98 lock().AssertAcquired(); | 99 lock().AssertAcquired(); |
99 data_pipe_->ProducerRemoveWaiter(waiter); | 100 data_pipe_->ProducerRemoveWaiter(waiter); |
100 } | 101 } |
101 | 102 |
102 bool DataPipeProducerDispatcher::IsBusyNoLock() const { | 103 bool DataPipeProducerDispatcher::IsBusyNoLock() const { |
103 lock().AssertAcquired(); | 104 lock().AssertAcquired(); |
104 return data_pipe_->ProducerIsBusy(); | 105 return data_pipe_->ProducerIsBusy(); |
105 } | 106 } |
106 | 107 |
107 } // namespace system | 108 } // namespace system |
108 } // namespace mojo | 109 } // namespace mojo |
OLD | NEW |