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

Unified Diff: native_client_sdk/src/libraries/nacl_io/kernel_object.h

Issue 18644009: [NaCl SDK] Upate atomic ops in nacl_io (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 'Move comment to correct location' Created 7 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
Index: native_client_sdk/src/libraries/nacl_io/kernel_object.h
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_object.h b/native_client_sdk/src/libraries/nacl_io/kernel_object.h
index 54108525936b36dc4020b79b402b3163c558b9c6..99143b02e4e1b4bd16189502eaca2f47f678db20 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_object.h
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_object.h
@@ -17,6 +17,8 @@
#include "nacl_io/mount_node.h"
#include "nacl_io/path.h"
+#include "sdk_util/simple_lock.h"
+
// KernelObject provides basic functionality for threadsafe access to kernel
// objects such as the CWD, mount points, file descriptors and file handles.
@@ -79,13 +81,13 @@ private:
MountMap_t mounts_;
// Lock to protect free_fds_ and handle_map_.
- pthread_mutex_t handle_lock_;
+ SimpleLock handle_lock_;
// Lock to protect handle_map_.
- pthread_mutex_t mount_lock_;
+ SimpleLock mount_lock_;
// Lock to protect cwd_.
- pthread_mutex_t cwd_lock_;
+ SimpleLock cwd_lock_;
DISALLOW_COPY_AND_ASSIGN(KernelObject);
};

Powered by Google App Engine
This is Rietveld 408576698