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

Unified Diff: native_client_sdk/src/libraries/nacl_io/mount_html5fs.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_html5fs.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_html5fs.cc b/native_client_sdk/src/libraries/nacl_io/mount_html5fs.cc
index edac8f4c05d98bd47a1c63006c9a8abd9cf49eb7..e883501da40ed2b610fba478150c330e193fbe96 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_html5fs.cc
+++ b/native_client_sdk/src/libraries/nacl_io/mount_html5fs.cc
@@ -169,9 +169,9 @@ void MountHtml5Fs::Destroy() {
}
Error MountHtml5Fs::BlockUntilFilesystemOpen() {
- AutoLock lock(&lock_);
+ AUTO_LOCK(filesysem_open_lock_);
while (!filesystem_open_has_result_) {
- pthread_cond_wait(&filesystem_open_cond_, &lock_);
+ pthread_cond_wait(&filesystem_open_cond_, filesysem_open_lock_.mutex());
}
return filesystem_open_error_;
}
@@ -184,7 +184,7 @@ void MountHtml5Fs::FilesystemOpenCallbackThunk(void* user_data,
}
void MountHtml5Fs::FilesystemOpenCallback(int32_t result) {
- AutoLock lock(&lock_);
+ AUTO_LOCK(filesysem_open_lock_);
filesystem_open_has_result_ = true;
filesystem_open_error_ = PPErrorToErrno(result);
pthread_cond_signal(&filesystem_open_cond_);

Powered by Google App Engine
This is Rietveld 408576698