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

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

Issue 2076263003: Plumb the handle signals state to Awakable::Awake(). (Closed) Base URL: https://github.com/domokit/mojo.git@work794_wait_set_4.2
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 | « mojo/edk/system/core_unittest.cc ('k') | mojo/edk/system/wait_set_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WAIT_SET_DISPATCHER_H_ 5 #ifndef MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_
6 #define MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_ 6 #define MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 util::RefPtr<Dispatcher>&& dispatcher, 106 util::RefPtr<Dispatcher>&& dispatcher,
107 MojoHandleSignals signals, 107 MojoHandleSignals signals,
108 uint64_t cookie) override; 108 uint64_t cookie) override;
109 MojoResult WaitSetRemoveImpl(uint64_t cookie) override; 109 MojoResult WaitSetRemoveImpl(uint64_t cookie) override;
110 MojoResult WaitSetWaitImpl(MojoDeadline deadline, 110 MojoResult WaitSetWaitImpl(MojoDeadline deadline,
111 UserPointer<uint32_t> num_results, 111 UserPointer<uint32_t> num_results,
112 UserPointer<MojoWaitSetResult> results, 112 UserPointer<MojoWaitSetResult> results,
113 UserPointer<uint32_t> max_results) override; 113 UserPointer<uint32_t> max_results) override;
114 114
115 // |Awakable| implementation: 115 // |Awakable| implementation:
116 bool Awake(MojoResult result, uint64_t context) override; 116 bool Awake(uint64_t context,
117 AwakeReason reason,
118 const HandleSignalsState& signals_state) override;
117 119
118 void AddPossiblyTriggeredNoLock(Entry* entry, 120 void AddPossiblyTriggeredNoLock(Entry* entry,
119 Entry::TriggerState new_trigger_state) 121 Entry::TriggerState new_trigger_state)
120 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex()); 122 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex());
121 void RemovePossiblyTriggeredNoLock(Entry* entry) 123 void RemovePossiblyTriggeredNoLock(Entry* entry)
122 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex()); 124 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex());
123 125
124 // Set when in the middle of a wait set operation (i.e., |WaitSet...Impl()|) 126 // Set when in the middle of a wait set operation (i.e., |WaitSet...Impl()|)
125 // with |mutex()| *unlocked*; if attempted (on a different thread), other wait 127 // with |mutex()| *unlocked*; if attempted (on a different thread), other wait
126 // set operations should report "busy". Note: Even if |is_busy_| is true, the 128 // set operations should report "busy". Note: Even if |is_busy_| is true, the
(...skipping 11 matching lines...) Expand all
138 // Size of the above list. 140 // Size of the above list.
139 size_t possibly_triggered_count_ MOJO_GUARDED_BY(mutex()) = 0u; 141 size_t possibly_triggered_count_ MOJO_GUARDED_BY(mutex()) = 0u;
140 142
141 MOJO_DISALLOW_COPY_AND_ASSIGN(WaitSetDispatcher); 143 MOJO_DISALLOW_COPY_AND_ASSIGN(WaitSetDispatcher);
142 }; 144 };
143 145
144 } // namespace system 146 } // namespace system
145 } // namespace mojo 147 } // namespace mojo
146 148
147 #endif // MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_ 149 #endif // MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/core_unittest.cc ('k') | mojo/edk/system/wait_set_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698