OLD | NEW |
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_SYSTEM_CORE_IMPL_H_ | 5 #ifndef MOJO_SYSTEM_CORE_IMPL_H_ |
6 #define MOJO_SYSTEM_CORE_IMPL_H_ | 6 #define MOJO_SYSTEM_CORE_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
12 #include "mojo/public/system/core_private.h" | 12 #include "mojo/public/system/core_private.h" |
13 #include "mojo/system/handle_table.h" | 13 #include "mojo/system/handle_table.h" |
| 14 #include "mojo/system/mapping_table.h" |
14 #include "mojo/system/system_impl_export.h" | 15 #include "mojo/system/system_impl_export.h" |
15 | 16 |
16 namespace mojo { | 17 namespace mojo { |
17 namespace system { | 18 namespace system { |
18 | 19 |
19 class Dispatcher; | 20 class Dispatcher; |
20 | 21 |
21 // |CoreImpl| is a singleton object that implements the Mojo system calls. All | 22 // |CoreImpl| is a singleton object that implements the Mojo system calls. All |
22 // public methods are thread-safe. | 23 // public methods are thread-safe. |
23 class MOJO_SYSTEM_IMPL_EXPORT CoreImpl : public Core { | 24 class MOJO_SYSTEM_IMPL_EXPORT CoreImpl : public Core { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 uint32_t num_handles, | 132 uint32_t num_handles, |
132 MojoDeadline deadline); | 133 MojoDeadline deadline); |
133 | 134 |
134 // --------------------------------------------------------------------------- | 135 // --------------------------------------------------------------------------- |
135 | 136 |
136 // TODO(vtl): |handle_table_lock_| should be a reader-writer lock (if only we | 137 // TODO(vtl): |handle_table_lock_| should be a reader-writer lock (if only we |
137 // had them). | 138 // had them). |
138 base::Lock handle_table_lock_; // Protects |handle_table_|. | 139 base::Lock handle_table_lock_; // Protects |handle_table_|. |
139 HandleTable handle_table_; | 140 HandleTable handle_table_; |
140 | 141 |
| 142 base::Lock mapping_table_lock_; // Protects |mapping_table_|. |
| 143 MappingTable mapping_table_; |
| 144 |
141 // --------------------------------------------------------------------------- | 145 // --------------------------------------------------------------------------- |
142 | 146 |
143 DISALLOW_COPY_AND_ASSIGN(CoreImpl); | 147 DISALLOW_COPY_AND_ASSIGN(CoreImpl); |
144 }; | 148 }; |
145 | 149 |
146 } // namespace system | 150 } // namespace system |
147 } // namespace mojo | 151 } // namespace mojo |
148 | 152 |
149 #endif // MOJO_SYSTEM_CORE_IMPL_H_ | 153 #endif // MOJO_SYSTEM_CORE_IMPL_H_ |
OLD | NEW |