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

Unified Diff: src/untrusted/init/scoped_lock.h

Issue 25147002: nacl_init Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 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
« no previous file with comments | « src/untrusted/init/process_lib.cc ('k') | src/untrusted/init/scoped_non_ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/init/scoped_lock.h
diff --git a/tests/subprocess/scoped_lock.h b/src/untrusted/init/scoped_lock.h
similarity index 57%
copy from tests/subprocess/scoped_lock.h
copy to src/untrusted/init/scoped_lock.h
index 0ebd2983e0a0aa2ca688334a10c1c680b188a582..d72aecf10c3cc332eec4d982066ef67a4b6d0db6 100644
--- a/tests/subprocess/scoped_lock.h
+++ b/src/untrusted/init/scoped_lock.h
@@ -1,24 +1,22 @@
-// -*- c++ -*-
// Copyright (c) 2013 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 NATIVE_CLIENT_TESTS_SUBPROCESS_SCOPED_LOCK_H_
+#ifndef NATIVE_CLIENT_SRC_UNTRUSTED_INIT_SCOPED_LOCK_H_
#include <pthread.h>
-// no name space, since this is so common
-class MutexLocker {
+class ScopedLock {
public:
- explicit MutexLocker(pthread_mutex_t *lock)
+ explicit ScopedLock(pthread_mutex_t *lock)
: lock_(lock) {
pthread_mutex_lock(lock_);
}
- ~MutexLocker() {
+ ~ScopedLock() {
pthread_mutex_unlock(lock_);
}
private:
pthread_mutex_t *lock_;
};
-#endif // NATIVE_CLIENT_TESTS_SUBPROCESS_SCOPED_LOCK_H_
+#endif // NATIVE_CLIENT_SRC_UNTRUSTED_INIT_SCOPED_LOCK_H_
« no previous file with comments | « src/untrusted/init/process_lib.cc ('k') | src/untrusted/init/scoped_non_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698