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

Side by Side Diff: mojo/edk/system/slave_connection_manager.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SLAVE_CONNECTION_MANAGER_H_ 5 #ifndef MOJO_EDK_SYSTEM_SLAVE_CONNECTION_MANAGER_H_
6 #define MOJO_EDK_SYSTEM_SLAVE_CONNECTION_MANAGER_H_ 6 #define MOJO_EDK_SYSTEM_SLAVE_CONNECTION_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/threading/thread.h" 11 #include "base/threading/thread.h"
12 #include "mojo/edk/embedder/platform_task_runner.h" 12 #include "mojo/edk/embedder/platform_task_runner.h"
13 #include "mojo/edk/embedder/scoped_platform_handle.h" 13 #include "mojo/edk/embedder/scoped_platform_handle.h"
14 #include "mojo/edk/embedder/slave_process_delegate.h" 14 #include "mojo/edk/embedder/slave_process_delegate.h"
15 #include "mojo/edk/system/connection_manager.h" 15 #include "mojo/edk/system/connection_manager.h"
16 #include "mojo/edk/system/mutex.h"
17 #include "mojo/edk/system/raw_channel.h" 16 #include "mojo/edk/system/raw_channel.h"
18 #include "mojo/edk/system/waitable_event.h" 17 #include "mojo/edk/system/waitable_event.h"
18 #include "mojo/edk/util/mutex.h"
19 #include "mojo/public/cpp/system/macros.h" 19 #include "mojo/public/cpp/system/macros.h"
20 20
21 namespace base { 21 namespace base {
22 class TaskRunner; 22 class TaskRunner;
23 } 23 }
24 24
25 namespace mojo { 25 namespace mojo {
26 26
27 namespace embedder { 27 namespace embedder {
28 class SlaveProcessDelegate; 28 class SlaveProcessDelegate;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // 4.4. |*ack_result_| and possibly |*ack_platform_handle_| are written to. 139 // 4.4. |*ack_result_| and possibly |*ack_platform_handle_| are written to.
140 // |awaiting_ack_type_| is "unset". 140 // |awaiting_ack_type_| is "unset".
141 // 4.5. |event_| is triggered. 141 // 4.5. |event_| is triggered.
142 // 142 //
143 // Back on thread T: 143 // Back on thread T:
144 // 6. |lock_| is released. 144 // 6. |lock_| is released.
145 // 7. [Return from |F()|.] 145 // 7. [Return from |F()|.]
146 // 146 //
147 // TODO(vtl): This is all a hack. It'd really suffice to have a version of 147 // TODO(vtl): This is all a hack. It'd really suffice to have a version of
148 // |RawChannel| with fully synchronous reading and writing. 148 // |RawChannel| with fully synchronous reading and writing.
149 Mutex mutex_; 149 util::Mutex mutex_;
150 AutoResetWaitableEvent event_; 150 AutoResetWaitableEvent event_;
151 151
152 MOJO_DISALLOW_COPY_AND_ASSIGN(SlaveConnectionManager); 152 MOJO_DISALLOW_COPY_AND_ASSIGN(SlaveConnectionManager);
153 }; 153 };
154 154
155 } // namespace system 155 } // namespace system
156 } // namespace mojo 156 } // namespace mojo
157 157
158 #endif // MOJO_EDK_SYSTEM_SLAVE_CONNECTION_MANAGER_H_ 158 #endif // MOJO_EDK_SYSTEM_SLAVE_CONNECTION_MANAGER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/simple_dispatcher_unittest.cc ('k') | mojo/edk/system/slave_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698