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

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

Issue 2084593005: Rationalize AddAwakable...() and RemoveAwakable...() methods. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh 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/message_pipe.cc ('k') | mojo/edk/system/message_pipe_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_MESSAGE_PIPE_DISPATCHER_H_ 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_
6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_ 6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_
7 7
8 #include "mojo/edk/system/dispatcher.h" 8 #include "mojo/edk/system/dispatcher.h"
9 #include "mojo/edk/system/memory.h" 9 #include "mojo/edk/system/memory.h"
10 #include "mojo/edk/util/ref_ptr.h" 10 #include "mojo/edk/util/ref_ptr.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 uint32_t num_bytes, 90 uint32_t num_bytes,
91 std::vector<HandleTransport>* transports, 91 std::vector<HandleTransport>* transports,
92 MojoWriteMessageFlags flags) override; 92 MojoWriteMessageFlags flags) override;
93 MojoResult ReadMessageImplNoLock(UserPointer<void> bytes, 93 MojoResult ReadMessageImplNoLock(UserPointer<void> bytes,
94 UserPointer<uint32_t> num_bytes, 94 UserPointer<uint32_t> num_bytes,
95 HandleVector* handles, 95 HandleVector* handles,
96 uint32_t* num_handles, 96 uint32_t* num_handles,
97 MojoReadMessageFlags flags) override; 97 MojoReadMessageFlags flags) override;
98 HandleSignalsState GetHandleSignalsStateImplNoLock() const override; 98 HandleSignalsState GetHandleSignalsStateImplNoLock() const override;
99 MojoResult AddAwakableImplNoLock(Awakable* awakable, 99 MojoResult AddAwakableImplNoLock(Awakable* awakable,
100 uint64_t context,
101 bool force,
100 MojoHandleSignals signals, 102 MojoHandleSignals signals,
101 bool force,
102 uint64_t context,
103 HandleSignalsState* signals_state) override; 103 HandleSignalsState* signals_state) override;
104 void RemoveAwakableImplNoLock(Awakable* awakable, 104 void RemoveAwakableImplNoLock(bool match_context,
105 Awakable* awakable,
106 uint64_t context,
105 HandleSignalsState* signals_state) override; 107 HandleSignalsState* signals_state) override;
106 void RemoveAwakableWithContextImplNoLock(
107 Awakable* awakable,
108 uint64_t context,
109 HandleSignalsState* signals_state) override;
110 void StartSerializeImplNoLock(Channel* channel, 108 void StartSerializeImplNoLock(Channel* channel,
111 size_t* max_size, 109 size_t* max_size,
112 size_t* max_platform_handles) override 110 size_t* max_platform_handles) override
113 MOJO_NOT_THREAD_SAFE; 111 MOJO_NOT_THREAD_SAFE;
114 bool EndSerializeAndCloseImplNoLock( 112 bool EndSerializeAndCloseImplNoLock(
115 Channel* channel, 113 Channel* channel,
116 void* destination, 114 void* destination,
117 size_t* actual_size, 115 size_t* actual_size,
118 std::vector<platform::ScopedPlatformHandle>* platform_handles) override 116 std::vector<platform::ScopedPlatformHandle>* platform_handles) override
119 MOJO_NOT_THREAD_SAFE; 117 MOJO_NOT_THREAD_SAFE;
120 118
121 // This will be null if closed. 119 // This will be null if closed.
122 util::RefPtr<MessagePipe> message_pipe_ MOJO_GUARDED_BY(mutex()); 120 util::RefPtr<MessagePipe> message_pipe_ MOJO_GUARDED_BY(mutex());
123 unsigned port_ MOJO_GUARDED_BY(mutex()); 121 unsigned port_ MOJO_GUARDED_BY(mutex());
124 122
125 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher); 123 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher);
126 }; 124 };
127 125
128 } // namespace system 126 } // namespace system
129 } // namespace mojo 127 } // namespace mojo
130 128
131 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_ 129 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe.cc ('k') | mojo/edk/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698