Index: experimental/flocking_geese/threading/scoped_mutex_lock.h |
diff --git a/experimental/flocking_geese/threading/scoped_mutex_lock.h b/experimental/flocking_geese/threading/scoped_mutex_lock.h |
deleted file mode 100644 |
index 60c17dd95bcc0351832a4a1f1f430c2a6db7d810..0000000000000000000000000000000000000000 |
--- a/experimental/flocking_geese/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 "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_ |
- |