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

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

Issue 2061913002: Don't call the other wait set impl dispatcher methods under mutex either. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 357 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
358 virtual MojoResult GetBufferInformationImplNoLock( 358 virtual MojoResult GetBufferInformationImplNoLock(
359 UserPointer<MojoBufferInformation> info, 359 UserPointer<MojoBufferInformation> info,
360 uint32_t info_num_bytes) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 360 uint32_t info_num_bytes) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
361 virtual MojoResult MapBufferImplNoLock( 361 virtual MojoResult MapBufferImplNoLock(
362 uint64_t offset, 362 uint64_t offset,
363 uint64_t num_bytes, 363 uint64_t num_bytes,
364 MojoMapBufferFlags flags, 364 MojoMapBufferFlags flags,
365 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping) 365 std::unique_ptr<platform::PlatformSharedBufferMapping>* mapping)
366 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 366 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
367 virtual MojoResult WaitSetAddImplNoLock( 367 // WARNING: Unlike the others, the following wait set methods are *not* called
368 // under |mutex_| and |is_closed_| is *not* checked. Thus any override must
369 // lock |mutex()| and check |is_closed_no_lock()| (returning
370 // |MOJO_RESULT_INVALID_ARGUMENT| if it is true).
371 virtual MojoResult WaitSetAddImpl(
368 UserPointer<const MojoWaitSetAddOptions> options, 372 UserPointer<const MojoWaitSetAddOptions> options,
369 Handle&& handle, 373 Handle&& handle,
370 MojoHandleSignals signals, 374 MojoHandleSignals signals,
371 uint64_t cookie) MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 375 uint64_t cookie);
372 virtual MojoResult WaitSetRemoveImplNoLock(uint64_t cookie) 376 virtual MojoResult WaitSetRemoveImpl(uint64_t cookie);
373 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
374 // WARNING: Unlike the others, this method is *not* called under |mutex_| and
375 // |is_closed_| is *not* checked. Thus any override must lock |mutex()| and
376 // check |is_closed_no_lock()| (returning |MOJO_RESULT_INVALID_ARGUMENT| if it
377 // is true).
378 virtual MojoResult WaitSetWaitImpl(MojoDeadline deadline, 377 virtual MojoResult WaitSetWaitImpl(MojoDeadline deadline,
379 UserPointer<uint32_t> num_results, 378 UserPointer<uint32_t> num_results,
380 UserPointer<MojoWaitSetResult> results, 379 UserPointer<MojoWaitSetResult> results,
381 UserPointer<uint32_t> max_results); 380 UserPointer<uint32_t> max_results);
382 virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const 381 virtual HandleSignalsState GetHandleSignalsStateImplNoLock() const
383 MOJO_SHARED_LOCKS_REQUIRED(mutex_); 382 MOJO_SHARED_LOCKS_REQUIRED(mutex_);
384 virtual MojoResult AddAwakableImplNoLock(Awakable* awakable, 383 virtual MojoResult AddAwakableImplNoLock(Awakable* awakable,
385 MojoHandleSignals signals, 384 MojoHandleSignals signals,
386 uint64_t context, 385 uint64_t context,
387 HandleSignalsState* signals_state) 386 HandleSignalsState* signals_state)
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 493
495 // So logging macros and |DCHECK_EQ()|, etc. work. 494 // So logging macros and |DCHECK_EQ()|, etc. work.
496 inline std::ostream& operator<<(std::ostream& out, Dispatcher::Type type) { 495 inline std::ostream& operator<<(std::ostream& out, Dispatcher::Type type) {
497 return out << static_cast<int>(type); 496 return out << static_cast<int>(type);
498 } 497 }
499 498
500 } // namespace system 499 } // namespace system
501 } // namespace mojo 500 } // namespace mojo
502 501
503 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ 502 #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