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

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

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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/thread_fuchsia.cc ('k') | runtime/bin/thread_linux.cc » ('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 RUNTIME_BIN_THREAD_LINUX_H_ 5 #ifndef RUNTIME_BIN_THREAD_LINUX_H_
6 #define RUNTIME_BIN_THREAD_LINUX_H_ 6 #define RUNTIME_BIN_THREAD_LINUX_H_
7 7
8 #if !defined(RUNTIME_BIN_THREAD_H_) 8 #if !defined(RUNTIME_BIN_THREAD_H_)
9 #error Do not include thread_linux.h directly; use thread.h instead. 9 #error Do not include thread_linux.h directly; use thread.h instead.
10 #endif 10 #endif
(...skipping 19 matching lines...) Expand all
30 ASSERT(key != kUnsetThreadLocalKey); 30 ASSERT(key != kUnsetThreadLocalKey);
31 return reinterpret_cast<uword>(pthread_getspecific(key)); 31 return reinterpret_cast<uword>(pthread_getspecific(key));
32 } 32 }
33 33
34 friend class Thread; 34 friend class Thread;
35 35
36 DISALLOW_ALLOCATION(); 36 DISALLOW_ALLOCATION();
37 DISALLOW_COPY_AND_ASSIGN(ThreadInlineImpl); 37 DISALLOW_COPY_AND_ASSIGN(ThreadInlineImpl);
38 }; 38 };
39 39
40
41 class MutexData { 40 class MutexData {
42 private: 41 private:
43 MutexData() {} 42 MutexData() {}
44 ~MutexData() {} 43 ~MutexData() {}
45 44
46 pthread_mutex_t* mutex() { return &mutex_; } 45 pthread_mutex_t* mutex() { return &mutex_; }
47 46
48 pthread_mutex_t mutex_; 47 pthread_mutex_t mutex_;
49 48
50 friend class Mutex; 49 friend class Mutex;
51 50
52 DISALLOW_ALLOCATION(); 51 DISALLOW_ALLOCATION();
53 DISALLOW_COPY_AND_ASSIGN(MutexData); 52 DISALLOW_COPY_AND_ASSIGN(MutexData);
54 }; 53 };
55 54
56
57 class MonitorData { 55 class MonitorData {
58 private: 56 private:
59 MonitorData() {} 57 MonitorData() {}
60 ~MonitorData() {} 58 ~MonitorData() {}
61 59
62 pthread_mutex_t* mutex() { return &mutex_; } 60 pthread_mutex_t* mutex() { return &mutex_; }
63 pthread_cond_t* cond() { return &cond_; } 61 pthread_cond_t* cond() { return &cond_; }
64 62
65 pthread_mutex_t mutex_; 63 pthread_mutex_t mutex_;
66 pthread_cond_t cond_; 64 pthread_cond_t cond_;
67 65
68 friend class Monitor; 66 friend class Monitor;
69 67
70 DISALLOW_ALLOCATION(); 68 DISALLOW_ALLOCATION();
71 DISALLOW_COPY_AND_ASSIGN(MonitorData); 69 DISALLOW_COPY_AND_ASSIGN(MonitorData);
72 }; 70 };
73 71
74 } // namespace bin 72 } // namespace bin
75 } // namespace dart 73 } // namespace dart
76 74
77 #endif // RUNTIME_BIN_THREAD_LINUX_H_ 75 #endif // RUNTIME_BIN_THREAD_LINUX_H_
OLDNEW
« no previous file with comments | « runtime/bin/thread_fuchsia.cc ('k') | runtime/bin/thread_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698