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

Unified Diff: mojo/edk/system/core.h

Issue 1223813007: Convert core.{h,cc} to use mojo::system::Mutex (and MutexLocker). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/edk/system/core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.h
diff --git a/mojo/edk/system/core.h b/mojo/edk/system/core.h
index 407a06488c8cab60f0273d2ae7ca023230e2840f..4ed5edeedc31a184501543fafca243a9bed22a00 100644
--- a/mojo/edk/system/core.h
+++ b/mojo/edk/system/core.h
@@ -10,10 +10,10 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/synchronization/lock.h"
#include "mojo/edk/system/handle_table.h"
#include "mojo/edk/system/mapping_table.h"
#include "mojo/edk/system/memory.h"
+#include "mojo/edk/system/mutex.h"
#include "mojo/edk/system/system_impl_export.h"
#include "mojo/public/c/system/buffer.h"
#include "mojo/public/c/system/data_pipe.h"
@@ -175,13 +175,13 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
embedder::PlatformSupport* const platform_support_;
- // TODO(vtl): |handle_table_lock_| should be a reader-writer lock (if only we
+ // TODO(vtl): |handle_table_mutex_| should be a reader-writer lock (if only we
// had them).
- base::Lock handle_table_lock_; // Protects |handle_table_|.
- HandleTable handle_table_;
+ Mutex handle_table_mutex_;
+ HandleTable handle_table_ MOJO_GUARDED_BY(handle_table_mutex_);
- base::Lock mapping_table_lock_; // Protects |mapping_table_|.
- MappingTable mapping_table_;
+ Mutex mapping_table_mutex_;
+ MappingTable mapping_table_ MOJO_GUARDED_BY(mapping_table_mutex_);
MOJO_DISALLOW_COPY_AND_ASSIGN(Core);
};
« no previous file with comments | « no previous file | mojo/edk/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698