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

Unified Diff: experimental/conways_life/threading/scoped_mutex_lock.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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: experimental/conways_life/threading/scoped_mutex_lock.h
diff --git a/experimental/conways_life/threading/scoped_mutex_lock.h b/experimental/conways_life/threading/scoped_mutex_lock.h
deleted file mode 100644
index e54d68432119df0a8f403303e8f033f5d66340d9..0000000000000000000000000000000000000000
--- a/experimental/conways_life/threading/scoped_mutex_lock.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2011 The Native Client 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 "experimental/conways_life/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_
-
« no previous file with comments | « experimental/conways_life/threading/ref_count.h ('k') | experimental/conways_life/threading/thread_condition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698