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

Unified Diff: native_client_sdk/src/libraries/c_salt/threading/scoped_mutex_lock.h

Issue 10854137: [NaCl SDK] gtest_ppapi library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove hacks Created 8 years, 4 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/c_salt/threading/scoped_mutex_lock.h
diff --git a/native_client_sdk/src/libraries/c_salt/threading/scoped_mutex_lock.h b/native_client_sdk/src/libraries/c_salt/threading/scoped_mutex_lock.h
deleted file mode 100644
index 10fbf61d6151a764a901b1e4b21e775b0dc1becd..0000000000000000000000000000000000000000
--- a/native_client_sdk/src/libraries/c_salt/threading/scoped_mutex_lock.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SCOPED_MUTEX_LOCK_H_
-#define SCOPED_MUTEX_LOCK_H_
-
-#include "c_salt/threading/pthread_ext.h"
-
-namespace threading {
-// A small helper RAII class that implements a scoped pthread_mutex lock.
-class ScopedMutexLock {
- public:
- explicit ScopedMutexLock(pthread_mutex_t* mutex) : mutex_(mutex) {
- if (pthread_mutex_lock(mutex_) != PTHREAD_MUTEX_SUCCESS) {
- mutex_ = NULL;
- }
- }
- ~ScopedMutexLock() {
- if (mutex_)
- pthread_mutex_unlock(mutex_);
- }
- bool is_valid() const {
- return mutex_ != NULL;
- }
- private:
- pthread_mutex_t* mutex_; // Weak reference.
-};
-} // namespace threading
-
-#endif // SCOPED_MUTEX_LOCK_H_
-

Powered by Google App Engine
This is Rietveld 408576698