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

Unified Diff: native_client_sdk/src/libraries/nacl_io/mount_node_http.cc

Issue 18644009: [NaCl SDK] Upate atomic ops in nacl_io (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add declartions for newval and oldval 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/mount_node_http.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node_http.cc b/native_client_sdk/src/libraries/nacl_io/mount_node_http.cc
index 02303953aef987d0824d3a691e40ddb88ae6fe65..7f5638f0b0aa6d0275ebea4ac01caaf031192069 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_node_http.cc
+++ b/native_client_sdk/src/libraries/nacl_io/mount_node_http.cc
@@ -160,7 +160,7 @@ Error MountNodeHttp::GetDents(size_t offs,
}
Error MountNodeHttp::GetStat(struct stat* stat) {
- AutoLock lock(&lock_);
+ AUTO_LOCK(node_lock_);
// Assume we need to 'HEAD' if we do not know the size, otherwise, assume
// that the information is constant. We can add a timeout if needed.
@@ -218,7 +218,7 @@ Error MountNodeHttp::Read(size_t offs,
int* out_bytes) {
*out_bytes = 0;
- AutoLock lock(&lock_);
+ AUTO_LOCK(node_lock_);
if (cache_content_) {
if (cached_data_.empty()) {
Error error = DownloadToCache();
@@ -248,7 +248,7 @@ Error MountNodeHttp::GetSize(size_t* out_size) {
// TODO(binji): This value should be cached properly; i.e. obey the caching
// headers returned by the server.
- AutoLock lock(&lock_);
+ AUTO_LOCK(node_lock_);
if (!has_cached_size_) {
// Even if DownloadToCache fails, the best result we can return is what
// was written to stat_.st_size.

Powered by Google App Engine
This is Rietveld 408576698