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

Side by Side Diff: runtime/bin/lockers.h

Issue 1800863002: Cleanup in //runtime/bin (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « runtime/bin/isolate_data.h ('k') | runtime/bin/log.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_LOCKERS_H_ 5 #ifndef BIN_LOCKERS_H_
6 #define BIN_LOCKERS_H_ 6 #define BIN_LOCKERS_H_
7 7
8 #include "bin/thread.h" 8 #include "bin/thread.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
11
12 namespace dart { 11 namespace dart {
13 namespace bin { 12 namespace bin {
14 13
15 class MutexLocker { 14 class MutexLocker {
16 public: 15 public:
17 explicit MutexLocker(Mutex* mutex) : mutex_(mutex) { 16 explicit MutexLocker(Mutex* mutex) : mutex_(mutex) {
18 ASSERT(mutex != NULL); 17 ASSERT(mutex != NULL);
19 mutex_->Lock(); 18 mutex_->Lock();
20 } 19 }
21 20
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 private: 55 private:
57 Monitor* const monitor_; 56 Monitor* const monitor_;
58 57
59 DISALLOW_COPY_AND_ASSIGN(MonitorLocker); 58 DISALLOW_COPY_AND_ASSIGN(MonitorLocker);
60 }; 59 };
61 60
62 } // namespace bin 61 } // namespace bin
63 } // namespace dart 62 } // namespace dart
64 63
65 #endif // BIN_LOCKERS_H_ 64 #endif // BIN_LOCKERS_H_
OLDNEW
« no previous file with comments | « runtime/bin/isolate_data.h ('k') | runtime/bin/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698