| 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 #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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 MojoResult GetBufferInformation(UserPointer<MojoBufferInformation> info, | 164 MojoResult GetBufferInformation(UserPointer<MojoBufferInformation> info, |
| 165 uint32_t info_num_bytes); | 165 uint32_t info_num_bytes); |
| 166 MojoResult MapBuffer( | 166 MojoResult MapBuffer( |
| 167 uint64_t offset, | 167 uint64_t offset, |
| 168 uint64_t num_bytes, | 168 uint64_t num_bytes, |
| 169 MojoMapBufferFlags flags, | 169 MojoMapBufferFlags flags, |
| 170 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping); | 170 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping); |
| 171 | 171 |
| 172 // |EntrypointClass::WAIT_SET|: | 172 // |EntrypointClass::WAIT_SET|: |
| 173 MojoResult WaitSetAdd(UserPointer<const MojoWaitSetAddOptions> options, | 173 MojoResult WaitSetAdd(UserPointer<const MojoWaitSetAddOptions> options, |
| 174 Handle&& handle, | 174 util::RefPtr<Dispatcher>&& dispatcher, |
| 175 MojoHandleSignals signals, | 175 MojoHandleSignals signals, |
| 176 uint64_t cookie); | 176 uint64_t cookie); |
| 177 MojoResult WaitSetRemove(uint64_t cookie); | 177 MojoResult WaitSetRemove(uint64_t cookie); |
| 178 // Note: This will likely block the calling thread (so, e.g., no mutexes | 178 // Note: This will likely block the calling thread (so, e.g., no mutexes |
| 179 // should be held when it's called). | 179 // should be held when it's called). |
| 180 MojoResult WaitSetWait(MojoDeadline deadline, | 180 MojoResult WaitSetWait(MojoDeadline deadline, |
| 181 UserPointer<uint32_t> num_results, | 181 UserPointer<uint32_t> num_results, |
| 182 UserPointer<MojoWaitSetResult> results, | 182 UserPointer<MojoWaitSetResult> results, |
| 183 UserPointer<uint32_t> max_results); | 183 UserPointer<uint32_t> max_results); |
| 184 | 184 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 uint64_t num_bytes, | 383 uint64_t num_bytes, |
| 384 MojoMapBufferFlags flags, | 384 MojoMapBufferFlags flags, |
| 385 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping) | 385 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping) |
| 386 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); | 386 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); |
| 387 // WARNING: Unlike the others, the following wait set methods are *not* called | 387 // WARNING: Unlike the others, the following wait set methods are *not* called |
| 388 // under |mutex_| and |is_closed_| is *not* checked. Thus any override must | 388 // under |mutex_| and |is_closed_| is *not* checked. Thus any override must |
| 389 // lock |mutex()| and check |is_closed_no_lock()| (returning | 389 // lock |mutex()| and check |is_closed_no_lock()| (returning |
| 390 // |MOJO_RESULT_INVALID_ARGUMENT| if it is true). | 390 // |MOJO_RESULT_INVALID_ARGUMENT| if it is true). |
| 391 virtual MojoResult WaitSetAddImpl( | 391 virtual MojoResult WaitSetAddImpl( |
| 392 UserPointer<const MojoWaitSetAddOptions> options, | 392 UserPointer<const MojoWaitSetAddOptions> options, |
| 393 Handle&& handle, | 393 util::RefPtr<Dispatcher>&& dispatcher, |
| 394 MojoHandleSignals signals, | 394 MojoHandleSignals signals, |
| 395 uint64_t cookie); | 395 uint64_t cookie); |
| 396 virtual MojoResult WaitSetRemoveImpl(uint64_t cookie); | 396 virtual MojoResult WaitSetRemoveImpl(uint64_t cookie); |
| 397 virtual MojoResult WaitSetWaitImpl(MojoDeadline deadline, | 397 virtual MojoResult WaitSetWaitImpl(MojoDeadline deadline, |
| 398 UserPointer<uint32_t> num_results, | 398 UserPointer<uint32_t> num_results, |
| 399 UserPointer<MojoWaitSetResult> results, | 399 UserPointer<MojoWaitSetResult> results, |
| 400 UserPointer<uint32_t> max_results); | 400 UserPointer<uint32_t> max_results); |
| 401 virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const | 401 virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const |
| 402 MOJO_SHARED_LOCKS_REQUIRED(mutex_); | 402 MOJO_SHARED_LOCKS_REQUIRED(mutex_); |
| 403 virtual MojoResult AddAwakableImplNoLock(Awakable* awakable, | 403 virtual MojoResult AddAwakableImplNoLock(Awakable* awakable, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 | 518 |
| 519 // So logging macros and |DCHECK_EQ()|, etc. work. | 519 // So logging macros and |DCHECK_EQ()|, etc. work. |
| 520 inline std::ostream& operator<<(std::ostream& out, Dispatcher::Type type) { | 520 inline std::ostream& operator<<(std::ostream& out, Dispatcher::Type type) { |
| 521 return out << static_cast<int>(type); | 521 return out << static_cast<int>(type); |
| 522 } | 522 } |
| 523 | 523 |
| 524 } // namespace system | 524 } // namespace system |
| 525 } // namespace mojo | 525 } // namespace mojo |
| 526 | 526 |
| 527 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ | 527 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ |
| OLD | NEW |