OLD | NEW |
1 // Copyright (c) 2011, 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 VM_THREAD_MACOS_H_ | 5 #ifndef PLATFORM_THREAD_MACOS_H_ |
6 #define VM_THREAD_MACOS_H_ | 6 #define PLATFORM_THREAD_MACOS_H_ |
7 | 7 |
8 #include <pthread.h> | 8 #include <pthread.h> |
9 | 9 |
10 #include "vm/globals.h" | 10 #include "platform/globals.h" |
11 | 11 |
12 namespace dart { | 12 namespace dart { |
13 | 13 |
14 class ThreadData { | |
15 private: | |
16 ThreadData() {} | |
17 ~ThreadData() {} | |
18 | |
19 pthread_t* tid() { return &tid_; } | |
20 | |
21 pthread_t tid_; | |
22 | |
23 friend class Thread; | |
24 | |
25 DISALLOW_ALLOCATION(); | |
26 DISALLOW_COPY_AND_ASSIGN(ThreadData); | |
27 }; | |
28 | |
29 | |
30 class MutexData { | 14 class MutexData { |
31 private: | 15 private: |
32 MutexData() {} | 16 MutexData() {} |
33 ~MutexData() {} | 17 ~MutexData() {} |
34 | 18 |
35 pthread_mutex_t* mutex() { return &mutex_; } | 19 pthread_mutex_t* mutex() { return &mutex_; } |
36 | 20 |
37 pthread_mutex_t mutex_; | 21 pthread_mutex_t mutex_; |
38 | 22 |
39 friend class Mutex; | 23 friend class Mutex; |
(...skipping 15 matching lines...) Expand all Loading... |
55 pthread_cond_t cond_; | 39 pthread_cond_t cond_; |
56 | 40 |
57 friend class Monitor; | 41 friend class Monitor; |
58 | 42 |
59 DISALLOW_ALLOCATION(); | 43 DISALLOW_ALLOCATION(); |
60 DISALLOW_COPY_AND_ASSIGN(MonitorData); | 44 DISALLOW_COPY_AND_ASSIGN(MonitorData); |
61 }; | 45 }; |
62 | 46 |
63 } // namespace dart | 47 } // namespace dart |
64 | 48 |
65 #endif // VM_THREAD_MACOS_H_ | 49 #endif // PLATFORM_THREAD_MACOS_H_ |
OLD | NEW |