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

Unified Diff: native_client_sdk/src/libraries/utils/auto_lock.h

Issue 10829027: [NaCl SDK] Add nacl_mounts to NaCl SDK build. Experimental for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync again Created 8 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 | « native_client_sdk/src/libraries/nacl_mounts/path.cc ('k') | native_client_sdk/src/libraries/utils/macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/utils/auto_lock.h
diff --git a/native_client_sdk/src/libraries/utils/auto_lock.h b/native_client_sdk/src/libraries/utils/auto_lock.h
index 992ebdcb00bb7591e2bf40e297e9136c83edacdf..19dd66f84de873c465f855b6a89c530c12c2eda1 100644
--- a/native_client_sdk/src/libraries/utils/auto_lock.h
+++ b/native_client_sdk/src/libraries/utils/auto_lock.h
@@ -18,6 +18,11 @@ class AutoLock {
if (lock_) pthread_mutex_unlock(lock_);
}
+ void Unlock() {
+ if (lock_) pthread_mutex_unlock(lock_);
+ lock_ = NULL;
+ }
+
private:
pthread_mutex_t* lock_;
};
« no previous file with comments | « native_client_sdk/src/libraries/nacl_mounts/path.cc ('k') | native_client_sdk/src/libraries/utils/macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698