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

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

Issue 1947733002: EDK: Rename DispatcherTransport to HandleTransport. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_edk_handle_11-x-work788_edk_handle_10
Patch Set: Created 4 years, 7 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/ipc_support_unittest.cc ('k') | mojo/edk/system/message_pipe.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_MESSAGE_PIPE_H_ 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_
6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ 6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 // These are called by the dispatcher to implement its methods of 83 // These are called by the dispatcher to implement its methods of
84 // corresponding names. In all cases, the port |port| must be open. 84 // corresponding names. In all cases, the port |port| must be open.
85 void CancelAllAwakables(unsigned port); 85 void CancelAllAwakables(unsigned port);
86 void Close(unsigned port); 86 void Close(unsigned port);
87 // Unlike |MessagePipeDispatcher::WriteMessage()|, this does not validate its 87 // Unlike |MessagePipeDispatcher::WriteMessage()|, this does not validate its
88 // arguments. 88 // arguments.
89 MojoResult WriteMessage(unsigned port, 89 MojoResult WriteMessage(unsigned port,
90 UserPointer<const void> bytes, 90 UserPointer<const void> bytes,
91 uint32_t num_bytes, 91 uint32_t num_bytes,
92 std::vector<DispatcherTransport>* transports, 92 std::vector<HandleTransport>* transports,
93 MojoWriteMessageFlags flags); 93 MojoWriteMessageFlags flags);
94 MojoResult ReadMessage(unsigned port, 94 MojoResult ReadMessage(unsigned port,
95 UserPointer<void> bytes, 95 UserPointer<void> bytes,
96 UserPointer<uint32_t> num_bytes, 96 UserPointer<uint32_t> num_bytes,
97 DispatcherVector* dispatchers, 97 DispatcherVector* dispatchers,
98 uint32_t* num_dispatchers, 98 uint32_t* num_dispatchers,
99 MojoReadMessageFlags flags); 99 MojoReadMessageFlags flags);
100 HandleSignalsState GetHandleSignalsState(unsigned port) const; 100 HandleSignalsState GetHandleSignalsState(unsigned port) const;
101 MojoResult AddAwakable(unsigned port, 101 MojoResult AddAwakable(unsigned port,
102 Awakable* awakable, 102 Awakable* awakable,
(...skipping 26 matching lines...) Expand all
129 129
130 private: 130 private:
131 MessagePipe(); 131 MessagePipe();
132 ~MessagePipe() override; 132 ~MessagePipe() override;
133 133
134 // This is used internally by |WriteMessage()| and by |OnReadMessage()|. 134 // This is used internally by |WriteMessage()| and by |OnReadMessage()|.
135 // |transports| may be non-null only if it's nonempty and |message| has no 135 // |transports| may be non-null only if it's nonempty and |message| has no
136 // dispatchers attached. Must be called with |lock_| held. 136 // dispatchers attached. Must be called with |lock_| held.
137 MojoResult EnqueueMessageNoLock(unsigned port, 137 MojoResult EnqueueMessageNoLock(unsigned port,
138 std::unique_ptr<MessageInTransit> message, 138 std::unique_ptr<MessageInTransit> message,
139 std::vector<DispatcherTransport>* transports) 139 std::vector<HandleTransport>* transports)
140 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 140 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
141 141
142 // Helper for |EnqueueMessageNoLock()|. 142 // Helper for |EnqueueMessageNoLock()|.
143 MojoResult AttachTransportsNoLock( 143 MojoResult AttachTransportsNoLock(unsigned port,
144 unsigned port, 144 MessageInTransit* message,
145 MessageInTransit* message, 145 std::vector<HandleTransport>* transports)
146 std::vector<DispatcherTransport>* transports)
147 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 146 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
148 147
149 mutable util::Mutex mutex_; 148 mutable util::Mutex mutex_;
150 std::unique_ptr<MessagePipeEndpoint> endpoints_[2] MOJO_GUARDED_BY(mutex_); 149 std::unique_ptr<MessagePipeEndpoint> endpoints_[2] MOJO_GUARDED_BY(mutex_);
151 150
152 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipe); 151 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipe);
153 }; 152 };
154 153
155 } // namespace system 154 } // namespace system
156 } // namespace mojo 155 } // namespace mojo
157 156
158 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ 157 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/ipc_support_unittest.cc ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698