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

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

Issue 1426343002: EDK: Move mutex.*, cond_var.*, and thread_annotations.h to //mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops Created 5 years, 1 month 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/master_connection_manager.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
11 #include <memory> 11 #include <memory>
12 #include <vector> 12 #include <vector>
13 13
14 #include "mojo/edk/embedder/platform_handle_vector.h" 14 #include "mojo/edk/embedder/platform_handle_vector.h"
15 #include "mojo/edk/system/channel_endpoint_client.h" 15 #include "mojo/edk/system/channel_endpoint_client.h"
16 #include "mojo/edk/system/dispatcher.h" 16 #include "mojo/edk/system/dispatcher.h"
17 #include "mojo/edk/system/handle_signals_state.h" 17 #include "mojo/edk/system/handle_signals_state.h"
18 #include "mojo/edk/system/memory.h" 18 #include "mojo/edk/system/memory.h"
19 #include "mojo/edk/system/message_in_transit.h" 19 #include "mojo/edk/system/message_in_transit.h"
20 #include "mojo/edk/system/message_pipe_endpoint.h" 20 #include "mojo/edk/system/message_pipe_endpoint.h"
21 #include "mojo/edk/system/mutex.h" 21 #include "mojo/edk/util/mutex.h"
22 #include "mojo/edk/util/ref_ptr.h" 22 #include "mojo/edk/util/ref_ptr.h"
23 #include "mojo/edk/util/thread_annotations.h"
23 #include "mojo/public/c/system/message_pipe.h" 24 #include "mojo/public/c/system/message_pipe.h"
24 #include "mojo/public/c/system/types.h" 25 #include "mojo/public/c/system/types.h"
25 #include "mojo/public/cpp/system/macros.h" 26 #include "mojo/public/cpp/system/macros.h"
26 27
27 namespace mojo { 28 namespace mojo {
28 namespace system { 29 namespace system {
29 30
30 class Awakable; 31 class Awakable;
31 class Channel; 32 class Channel;
32 class ChannelEndpoint; 33 class ChannelEndpoint;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 std::vector<DispatcherTransport>* transports) 131 std::vector<DispatcherTransport>* transports)
131 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 132 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
132 133
133 // Helper for |EnqueueMessageNoLock()|. 134 // Helper for |EnqueueMessageNoLock()|.
134 MojoResult AttachTransportsNoLock( 135 MojoResult AttachTransportsNoLock(
135 unsigned port, 136 unsigned port,
136 MessageInTransit* message, 137 MessageInTransit* message,
137 std::vector<DispatcherTransport>* transports) 138 std::vector<DispatcherTransport>* transports)
138 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_); 139 MOJO_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
139 140
140 mutable Mutex mutex_; 141 mutable util::Mutex mutex_;
141 std::unique_ptr<MessagePipeEndpoint> endpoints_[2] MOJO_GUARDED_BY(mutex_); 142 std::unique_ptr<MessagePipeEndpoint> endpoints_[2] MOJO_GUARDED_BY(mutex_);
142 143
143 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipe); 144 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipe);
144 }; 145 };
145 146
146 } // namespace system 147 } // namespace system
147 } // namespace mojo 148 } // namespace mojo
148 149
149 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_ 150 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/master_connection_manager.cc ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698